@aurigami/sdk 1.7.4 → 1.7.5
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/sdk.cjs.development.js +13 -5
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +13 -5
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/helpers/helpers.ts +1 -0
|
@@ -1387,6 +1387,14 @@ function _getBlocksTimestamp() {
|
|
|
1387
1387
|
while (1) {
|
|
1388
1388
|
switch (_context4.prev = _context4.next) {
|
|
1389
1389
|
case 0:
|
|
1390
|
+
if (!(blockNumbers.length == 0)) {
|
|
1391
|
+
_context4.next = 2;
|
|
1392
|
+
break;
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
return _context4.abrupt("return", []);
|
|
1396
|
+
|
|
1397
|
+
case 2:
|
|
1390
1398
|
CHUNK_SIZE = 100; // graphql query limit
|
|
1391
1399
|
|
|
1392
1400
|
promises = [];
|
|
@@ -1400,10 +1408,10 @@ function _getBlocksTimestamp() {
|
|
|
1400
1408
|
} // merge all the json objects
|
|
1401
1409
|
|
|
1402
1410
|
|
|
1403
|
-
_context4.next =
|
|
1411
|
+
_context4.next = 8;
|
|
1404
1412
|
return Promise.all(promises);
|
|
1405
1413
|
|
|
1406
|
-
case
|
|
1414
|
+
case 8:
|
|
1407
1415
|
results = _context4.sent.reduce(function (acc, cur) {
|
|
1408
1416
|
return _extends({}, acc, cur);
|
|
1409
1417
|
});
|
|
@@ -1415,10 +1423,10 @@ function _getBlocksTimestamp() {
|
|
|
1415
1423
|
devLog("These blocks are missing from Aurora GraphQL endpoint: " + missingBlocks.join(', '));
|
|
1416
1424
|
}
|
|
1417
1425
|
|
|
1418
|
-
_context4.next =
|
|
1426
|
+
_context4.next = 13;
|
|
1419
1427
|
return getBlocksTimestampViaRPC(provider, missingBlocks);
|
|
1420
1428
|
|
|
1421
|
-
case
|
|
1429
|
+
case 13:
|
|
1422
1430
|
missingBlocksTimestamps = _context4.sent;
|
|
1423
1431
|
missingBlocksTimestamps.forEach(function (timestamp, index) {
|
|
1424
1432
|
results["b" + missingBlocks[index]] = {
|
|
@@ -1429,7 +1437,7 @@ function _getBlocksTimestamp() {
|
|
|
1429
1437
|
return Math.trunc(new Date(results["b" + blockNumber].timestamp).getTime() / 1000);
|
|
1430
1438
|
}));
|
|
1431
1439
|
|
|
1432
|
-
case
|
|
1440
|
+
case 16:
|
|
1433
1441
|
case "end":
|
|
1434
1442
|
return _context4.stop();
|
|
1435
1443
|
}
|