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