@pioneer-platform/zapper-client 8.3.1 → 8.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +10 -5
- package/package.json +2 -2
- package/yarn-error.log +0 -14584
package/lib/index.js
CHANGED
|
@@ -55,7 +55,7 @@ console.log(Authorization);
|
|
|
55
55
|
var URL_SERVICE = "https://api.zapper.xyz";
|
|
56
56
|
var axiosRetry = require('axios-retry');
|
|
57
57
|
axiosRetry(axios, {
|
|
58
|
-
retries: 3,
|
|
58
|
+
retries: 3, // number of retries
|
|
59
59
|
retryDelay: function (retryCount) {
|
|
60
60
|
log.debug(TAG, "retry attempt: ".concat(retryCount));
|
|
61
61
|
return retryCount * 2000; // time interval between retries
|
|
@@ -125,8 +125,13 @@ var get_portfolio = function (address) {
|
|
|
125
125
|
var network = token.network;
|
|
126
126
|
log.debug(tag, "network: ", token);
|
|
127
127
|
var caip = pioneer_caip_1.evmCaips[network];
|
|
128
|
-
token.
|
|
129
|
-
|
|
128
|
+
token.networkId = caip;
|
|
129
|
+
if (token.token.address !== '0x0000000000000000000000000000000000000000') {
|
|
130
|
+
token.assetCaip = caip + ":" + token.token.address;
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
token.assetCaip = caip;
|
|
134
|
+
}
|
|
130
135
|
log.debug(tag, "token.balanceUSD: ", token.token.balanceUSD);
|
|
131
136
|
totalBalanceUsdTokens_1 += token.token.balanceUSD;
|
|
132
137
|
});
|
|
@@ -326,10 +331,10 @@ var get_nfts = function (address) {
|
|
|
326
331
|
_a.label = 1;
|
|
327
332
|
case 1:
|
|
328
333
|
_a.trys.push([1, 3, , 4]);
|
|
329
|
-
url = URL_SERVICE + "v2/nft/user/tokens?userAddress=" + address;
|
|
334
|
+
url = URL_SERVICE + "/v2/nft/user/tokens?userAddress=" + address;
|
|
330
335
|
return [4 /*yield*/, axios({
|
|
331
336
|
url: url,
|
|
332
|
-
method: 'GET'
|
|
337
|
+
method: 'GET',
|
|
333
338
|
})];
|
|
334
339
|
case 2:
|
|
335
340
|
result = _a.sent();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pioneer-platform/zapper-client",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.4",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"types": "./lib/index.d.ts",
|
|
6
6
|
"dependencies": {
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"ts-jest": "^29.0.5",
|
|
28
28
|
"typescript": "^5.0.2"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "e4a7114f00103ee48533c369dba4a02021ddcbe4"
|
|
31
31
|
}
|