@fileverse-dev/formulajs 4.4.21-price-and-wallet-4 → 4.4.21-price-and-wallet-6
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/browser/formula.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @fileverse-dev/formulajs v4.4.21-price-and-wallet-
|
|
1
|
+
/* @fileverse-dev/formulajs v4.4.21-price-and-wallet-6 */
|
|
2
2
|
var _excluded = [ "confirmations", "dataDecoded" ];
|
|
3
3
|
|
|
4
4
|
function _objectWithoutProperties(e, t) {
|
|
@@ -19101,16 +19101,16 @@ function _typeof(o) {
|
|
|
19101
19101
|
returnSingleValue = false;
|
|
19102
19102
|
if (isAddress$1.isAddress(input1)) {
|
|
19103
19103
|
tokenAddress = input1;
|
|
19104
|
-
url += "&token=".concat(
|
|
19104
|
+
url += "&token=".concat(tokenAddress, "&chain=").concat(input2);
|
|
19105
19105
|
if (input3) {
|
|
19106
19106
|
url += "&time=".concat(encodeURIComponent(input3));
|
|
19107
19107
|
}
|
|
19108
19108
|
} else {
|
|
19109
|
-
coin = input1;
|
|
19110
|
-
url += "&coin=".concat(
|
|
19109
|
+
coin = input1.replace(/\s+/g, "");
|
|
19110
|
+
url += "&coin=".concat(coin);
|
|
19111
19111
|
if (input2) {
|
|
19112
19112
|
url += "&time=".concat(encodeURIComponent(input2));
|
|
19113
|
-
} else {
|
|
19113
|
+
} else if (coin.split(",") === 1) {
|
|
19114
19114
|
returnSingleValue = true;
|
|
19115
19115
|
}
|
|
19116
19116
|
}
|
|
@@ -19254,57 +19254,58 @@ function _typeof(o) {
|
|
|
19254
19254
|
query: query,
|
|
19255
19255
|
time: time
|
|
19256
19256
|
});
|
|
19257
|
+
addresses = addresses.replace(/\s+/g, "");
|
|
19257
19258
|
baseUrl = window.useLocal ? "http://localhost:3000" : "https://onchain-proxy.fileverse.io";
|
|
19258
|
-
_context37.next =
|
|
19259
|
+
_context37.next = 7;
|
|
19259
19260
|
return getResolvedAddresses(addresses);
|
|
19260
19261
|
|
|
19261
|
-
case
|
|
19262
|
+
case 7:
|
|
19262
19263
|
resolvedAddresses = _context37.sent;
|
|
19263
19264
|
url = "".concat(baseUrl, "/third-party?service=wallet&addresses=").concat(resolvedAddresses, "&chains=").concat(chains, "&query=").concat(query);
|
|
19264
19265
|
if (time) {
|
|
19265
19266
|
url += "&time=".concat(time);
|
|
19266
19267
|
}
|
|
19267
|
-
_context37.next =
|
|
19268
|
+
_context37.next = 12;
|
|
19268
19269
|
return fetch(url);
|
|
19269
19270
|
|
|
19270
|
-
case
|
|
19271
|
+
case 12:
|
|
19271
19272
|
res = _context37.sent;
|
|
19272
19273
|
if (!(res.status === 400)) {
|
|
19273
|
-
_context37.next =
|
|
19274
|
+
_context37.next = 18;
|
|
19274
19275
|
break;
|
|
19275
19276
|
}
|
|
19276
|
-
_context37.next =
|
|
19277
|
+
_context37.next = 16;
|
|
19277
19278
|
return res.json();
|
|
19278
19279
|
|
|
19279
|
-
case
|
|
19280
|
+
case 16:
|
|
19280
19281
|
errorData = _context37.sent;
|
|
19281
19282
|
throw new ValidationError(errorData.message);
|
|
19282
19283
|
|
|
19283
|
-
case
|
|
19284
|
+
case 18:
|
|
19284
19285
|
if (res.ok) {
|
|
19285
|
-
_context37.next =
|
|
19286
|
+
_context37.next = 20;
|
|
19286
19287
|
break;
|
|
19287
19288
|
}
|
|
19288
19289
|
throw new NetworkError("WALLET", res.status);
|
|
19289
19290
|
|
|
19290
|
-
case
|
|
19291
|
-
_context37.next =
|
|
19291
|
+
case 20:
|
|
19292
|
+
_context37.next = 22;
|
|
19292
19293
|
return res.json();
|
|
19293
19294
|
|
|
19294
|
-
case
|
|
19295
|
+
case 22:
|
|
19295
19296
|
json = _context37.sent;
|
|
19296
19297
|
return _context37.abrupt("return", json);
|
|
19297
19298
|
|
|
19298
|
-
case
|
|
19299
|
-
_context37.prev =
|
|
19299
|
+
case 26:
|
|
19300
|
+
_context37.prev = 26;
|
|
19300
19301
|
_context37.t0 = _context37["catch"](0);
|
|
19301
19302
|
return _context37.abrupt("return", errorMessageHandler(_context37.t0, "WALLET"));
|
|
19302
19303
|
|
|
19303
|
-
case
|
|
19304
|
+
case 29:
|
|
19304
19305
|
case "end":
|
|
19305
19306
|
return _context37.stop();
|
|
19306
19307
|
}
|
|
19307
|
-
}), _callee33, null, [ [ 0,
|
|
19308
|
+
}), _callee33, null, [ [ 0, 26 ] ]);
|
|
19308
19309
|
})));
|
|
19309
19310
|
return _WALLET.apply(this, arguments);
|
|
19310
19311
|
}
|