@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 +31 -37
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +31 -37
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
@@ -23074,10 +23074,6 @@ function _createSuper(Derived) {
|
|
23074
23074
|
};
|
23075
23075
|
}
|
23076
23076
|
|
23077
|
-
function _readOnlyError(name) {
|
23078
|
-
throw new TypeError("\"" + name + "\" is read-only");
|
23079
|
-
}
|
23080
|
-
|
23081
23077
|
function _slicedToArray(arr, i) {
|
23082
23078
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest();
|
23083
23079
|
}
|
@@ -64238,91 +64234,89 @@ function _getTokenPricesInDollarsOnCoingecko() {
|
|
64238
64234
|
response = {
|
64239
64235
|
data: {}
|
64240
64236
|
};
|
64241
|
-
_readOnlyError("tokenPrices");
|
64242
|
-
_readOnlyError("tokenPricesPromises");
|
64243
64237
|
tkns = [];
|
64244
64238
|
_iterator2 = _createForOfIteratorHelper(tokens);
|
64245
|
-
_context3.prev =
|
64239
|
+
_context3.prev = 5;
|
64246
64240
|
|
64247
64241
|
_iterator2.s();
|
64248
64242
|
|
64249
|
-
case
|
64243
|
+
case 7:
|
64250
64244
|
if ((_step2 = _iterator2.n()).done) {
|
64251
|
-
_context3.next =
|
64245
|
+
_context3.next = 29;
|
64252
64246
|
break;
|
64253
64247
|
}
|
64254
64248
|
|
64255
64249
|
token = _step2.value;
|
64256
64250
|
|
64257
64251
|
if (!(!token || token === VOID_ETHEREUM_ADDRESS)) {
|
64258
|
-
_context3.next =
|
64252
|
+
_context3.next = 14;
|
64259
64253
|
break;
|
64260
64254
|
}
|
64261
64255
|
|
64262
|
-
_context3.next =
|
64256
|
+
_context3.next = 12;
|
64263
64257
|
return getEthereumPrice({
|
64264
64258
|
context: context
|
64265
64259
|
});
|
64266
64260
|
|
64267
|
-
case
|
64261
|
+
case 12:
|
64268
64262
|
response.data[token] = _context3.sent;
|
64269
|
-
return _context3.abrupt("continue",
|
64263
|
+
return _context3.abrupt("continue", 27);
|
64270
64264
|
|
64271
|
-
case
|
64265
|
+
case 14:
|
64272
64266
|
if (!(tokenPrices[token] && tokenPrices[token].requestExpires > new Date().getTime() && tokenPrices[token].price !== 0)) {
|
64273
|
-
_context3.next =
|
64267
|
+
_context3.next = 18;
|
64274
64268
|
break;
|
64275
64269
|
}
|
64276
64270
|
|
64277
64271
|
response.data[token] = {
|
64278
64272
|
usd: tokenPrices[token].price
|
64279
64273
|
};
|
64280
|
-
_context3.next =
|
64274
|
+
_context3.next = 27;
|
64281
64275
|
break;
|
64282
64276
|
|
64283
|
-
case
|
64277
|
+
case 18:
|
64284
64278
|
if (!tokenPricesPromises[token]) {
|
64285
|
-
_context3.next =
|
64279
|
+
_context3.next = 26;
|
64286
64280
|
break;
|
64287
64281
|
}
|
64288
64282
|
|
64289
|
-
_context3.next =
|
64283
|
+
_context3.next = 21;
|
64290
64284
|
return tokenPricesPromises[token];
|
64291
64285
|
|
64292
|
-
case
|
64286
|
+
case 21:
|
64293
64287
|
_context3.t0 = token;
|
64294
64288
|
_context3.t1 = _context3.sent.data[_context3.t0].usd;
|
64295
64289
|
response.data[token] = {
|
64296
64290
|
usd: _context3.t1
|
64297
64291
|
};
|
64298
|
-
_context3.next =
|
64292
|
+
_context3.next = 27;
|
64299
64293
|
break;
|
64300
64294
|
|
64301
|
-
case
|
64295
|
+
case 26:
|
64302
64296
|
tkns.push(token);
|
64303
64297
|
|
64304
|
-
case
|
64305
|
-
_context3.next =
|
64298
|
+
case 27:
|
64299
|
+
_context3.next = 7;
|
64306
64300
|
break;
|
64307
64301
|
|
64308
|
-
case
|
64309
|
-
_context3.next =
|
64302
|
+
case 29:
|
64303
|
+
_context3.next = 34;
|
64310
64304
|
break;
|
64311
64305
|
|
64312
|
-
case
|
64313
|
-
_context3.prev =
|
64314
|
-
_context3.t2 = _context3["catch"](
|
64306
|
+
case 31:
|
64307
|
+
_context3.prev = 31;
|
64308
|
+
_context3.t2 = _context3["catch"](5);
|
64315
64309
|
|
64316
64310
|
_iterator2.e(_context3.t2);
|
64317
64311
|
|
64318
|
-
case
|
64319
|
-
_context3.prev =
|
64312
|
+
case 34:
|
64313
|
+
_context3.prev = 34;
|
64320
64314
|
|
64321
64315
|
_iterator2.f();
|
64322
64316
|
|
64323
|
-
return _context3.finish(
|
64317
|
+
return _context3.finish(34);
|
64324
64318
|
|
64325
|
-
case
|
64319
|
+
case 37:
|
64326
64320
|
prom = /*#__PURE__*/function () {
|
64327
64321
|
var _ref3 = _asyncToGenerator$1( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(t1, t2) {
|
64328
64322
|
var res;
|
@@ -64389,10 +64383,10 @@ function _getTokenPricesInDollarsOnCoingecko() {
|
|
64389
64383
|
tokenPricesPromises[token] = prom;
|
64390
64384
|
}
|
64391
64385
|
|
64392
|
-
_context3.next =
|
64386
|
+
_context3.next = 42;
|
64393
64387
|
return prom;
|
64394
64388
|
|
64395
|
-
case
|
64389
|
+
case 42:
|
64396
64390
|
prom = _context3.sent;
|
64397
64391
|
Object.entries(prom.data).forEach(function (it) {
|
64398
64392
|
return response.data[it[0]] = it[1];
|
@@ -64421,12 +64415,12 @@ function _getTokenPricesInDollarsOnCoingecko() {
|
|
64421
64415
|
|
64422
64416
|
return _context3.abrupt("return", response);
|
64423
64417
|
|
64424
|
-
case
|
64418
|
+
case 48:
|
64425
64419
|
case "end":
|
64426
64420
|
return _context3.stop();
|
64427
64421
|
}
|
64428
64422
|
}
|
64429
|
-
}, _callee3, null, [[
|
64423
|
+
}, _callee3, null, [[5, 31, 34, 37]]);
|
64430
64424
|
}));
|
64431
64425
|
return _getTokenPricesInDollarsOnCoingecko.apply(this, arguments);
|
64432
64426
|
}
|