@ethereansos/interfaces-core 0.4.100 → 0.4.101

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/dist/index.cjs.js CHANGED
@@ -23086,10 +23086,6 @@ function _createSuper(Derived) {
23086
23086
  };
23087
23087
  }
23088
23088
 
23089
- function _readOnlyError(name) {
23090
- throw new TypeError("\"" + name + "\" is read-only");
23091
- }
23092
-
23093
23089
  function _slicedToArray(arr, i) {
23094
23090
  return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest();
23095
23091
  }
@@ -64250,91 +64246,89 @@ function _getTokenPricesInDollarsOnCoingecko() {
64250
64246
  response = {
64251
64247
  data: {}
64252
64248
  };
64253
- _readOnlyError("tokenPrices");
64254
- _readOnlyError("tokenPricesPromises");
64255
64249
  tkns = [];
64256
64250
  _iterator2 = _createForOfIteratorHelper(tokens);
64257
- _context3.prev = 7;
64251
+ _context3.prev = 5;
64258
64252
 
64259
64253
  _iterator2.s();
64260
64254
 
64261
- case 9:
64255
+ case 7:
64262
64256
  if ((_step2 = _iterator2.n()).done) {
64263
- _context3.next = 31;
64257
+ _context3.next = 29;
64264
64258
  break;
64265
64259
  }
64266
64260
 
64267
64261
  token = _step2.value;
64268
64262
 
64269
64263
  if (!(!token || token === VOID_ETHEREUM_ADDRESS)) {
64270
- _context3.next = 16;
64264
+ _context3.next = 14;
64271
64265
  break;
64272
64266
  }
64273
64267
 
64274
- _context3.next = 14;
64268
+ _context3.next = 12;
64275
64269
  return getEthereumPrice({
64276
64270
  context: context
64277
64271
  });
64278
64272
 
64279
- case 14:
64273
+ case 12:
64280
64274
  response.data[token] = _context3.sent;
64281
- return _context3.abrupt("continue", 29);
64275
+ return _context3.abrupt("continue", 27);
64282
64276
 
64283
- case 16:
64277
+ case 14:
64284
64278
  if (!(tokenPrices[token] && tokenPrices[token].requestExpires > new Date().getTime() && tokenPrices[token].price !== 0)) {
64285
- _context3.next = 20;
64279
+ _context3.next = 18;
64286
64280
  break;
64287
64281
  }
64288
64282
 
64289
64283
  response.data[token] = {
64290
64284
  usd: tokenPrices[token].price
64291
64285
  };
64292
- _context3.next = 29;
64286
+ _context3.next = 27;
64293
64287
  break;
64294
64288
 
64295
- case 20:
64289
+ case 18:
64296
64290
  if (!tokenPricesPromises[token]) {
64297
- _context3.next = 28;
64291
+ _context3.next = 26;
64298
64292
  break;
64299
64293
  }
64300
64294
 
64301
- _context3.next = 23;
64295
+ _context3.next = 21;
64302
64296
  return tokenPricesPromises[token];
64303
64297
 
64304
- case 23:
64298
+ case 21:
64305
64299
  _context3.t0 = token;
64306
64300
  _context3.t1 = _context3.sent.data[_context3.t0].usd;
64307
64301
  response.data[token] = {
64308
64302
  usd: _context3.t1
64309
64303
  };
64310
- _context3.next = 29;
64304
+ _context3.next = 27;
64311
64305
  break;
64312
64306
 
64313
- case 28:
64307
+ case 26:
64314
64308
  tkns.push(token);
64315
64309
 
64316
- case 29:
64317
- _context3.next = 9;
64310
+ case 27:
64311
+ _context3.next = 7;
64318
64312
  break;
64319
64313
 
64320
- case 31:
64321
- _context3.next = 36;
64314
+ case 29:
64315
+ _context3.next = 34;
64322
64316
  break;
64323
64317
 
64324
- case 33:
64325
- _context3.prev = 33;
64326
- _context3.t2 = _context3["catch"](7);
64318
+ case 31:
64319
+ _context3.prev = 31;
64320
+ _context3.t2 = _context3["catch"](5);
64327
64321
 
64328
64322
  _iterator2.e(_context3.t2);
64329
64323
 
64330
- case 36:
64331
- _context3.prev = 36;
64324
+ case 34:
64325
+ _context3.prev = 34;
64332
64326
 
64333
64327
  _iterator2.f();
64334
64328
 
64335
- return _context3.finish(36);
64329
+ return _context3.finish(34);
64336
64330
 
64337
- case 39:
64331
+ case 37:
64338
64332
  prom = /*#__PURE__*/function () {
64339
64333
  var _ref3 = _asyncToGenerator$1( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(t1, t2) {
64340
64334
  var res;
@@ -64401,10 +64395,10 @@ function _getTokenPricesInDollarsOnCoingecko() {
64401
64395
  tokenPricesPromises[token] = prom;
64402
64396
  }
64403
64397
 
64404
- _context3.next = 44;
64398
+ _context3.next = 42;
64405
64399
  return prom;
64406
64400
 
64407
- case 44:
64401
+ case 42:
64408
64402
  prom = _context3.sent;
64409
64403
  Object.entries(prom.data).forEach(function (it) {
64410
64404
  return response.data[it[0]] = it[1];
@@ -64433,12 +64427,12 @@ function _getTokenPricesInDollarsOnCoingecko() {
64433
64427
 
64434
64428
  return _context3.abrupt("return", response);
64435
64429
 
64436
- case 50:
64430
+ case 48:
64437
64431
  case "end":
64438
64432
  return _context3.stop();
64439
64433
  }
64440
64434
  }
64441
- }, _callee3, null, [[7, 33, 36, 39]]);
64435
+ }, _callee3, null, [[5, 31, 34, 37]]);
64442
64436
  }));
64443
64437
  return _getTokenPricesInDollarsOnCoingecko.apply(this, arguments);
64444
64438
  }