@fileverse-dev/formulajs 4.4.11-mod-68-patch-2 → 4.4.11-mod-68-patch-4
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 +37 -31
- package/lib/browser/formula.min.js +2 -2
- package/lib/browser/formula.min.js.map +1 -1
- package/lib/cjs/index.cjs +3 -1
- package/lib/esm/index.mjs +3 -1
- package/package.json +1 -1
package/lib/browser/formula.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @fileverse-dev/formulajs v4.4.11-mod-68-patch-
|
|
1
|
+
/* @fileverse-dev/formulajs v4.4.11-mod-68-patch-4 */
|
|
2
2
|
var _excluded = [ "confirmations", "dataDecoded" ];
|
|
3
3
|
|
|
4
4
|
function _objectWithoutProperties(e, t) {
|
|
@@ -11159,7 +11159,11 @@ function _typeof(o) {
|
|
|
11159
11159
|
case 2:
|
|
11160
11160
|
chainId = CHAIN_ID_MAP[chain];
|
|
11161
11161
|
url = "https://api.etherscan.io/v2/api?module=block&action=getblocknobytime×tamp=".concat(timestamp, "&closest=before&apikey=").concat(apiKey, "&chainId=").concat(chainId);
|
|
11162
|
-
_getUrlAndHeaders = getUrlAndHeaders(
|
|
11162
|
+
_getUrlAndHeaders = getUrlAndHeaders({
|
|
11163
|
+
url: url,
|
|
11164
|
+
serviceName: "Etherscan",
|
|
11165
|
+
headers: {}
|
|
11166
|
+
}), finalUrl = _getUrlAndHeaders.URL, HEADERS = _getUrlAndHeaders.HEADERS;
|
|
11163
11167
|
_context.next = 7;
|
|
11164
11168
|
return fetch(finalUrl, {
|
|
11165
11169
|
method: "GET",
|
|
@@ -17722,16 +17726,17 @@ function _typeof(o) {
|
|
|
17722
17726
|
while (1) switch (_context23.prev = _context23.next) {
|
|
17723
17727
|
case 0:
|
|
17724
17728
|
chain = _step42.value;
|
|
17729
|
+
console.log("chain", chain);
|
|
17725
17730
|
chainId = CHAIN_ID_MAP[chain];
|
|
17726
17731
|
if (chainId) {
|
|
17727
|
-
_context23.next =
|
|
17732
|
+
_context23.next = 5;
|
|
17728
17733
|
break;
|
|
17729
17734
|
}
|
|
17730
17735
|
throw new ValidationError("Invalid chain: ".concat(chain));
|
|
17731
17736
|
|
|
17732
|
-
case
|
|
17737
|
+
case 5:
|
|
17733
17738
|
if (!(category === "balance")) {
|
|
17734
|
-
_context23.next =
|
|
17739
|
+
_context23.next = 18;
|
|
17735
17740
|
break;
|
|
17736
17741
|
}
|
|
17737
17742
|
_loop2 = _regeneratorRuntime().mark((function _loop2(i) {
|
|
@@ -17773,55 +17778,56 @@ function _typeof(o) {
|
|
|
17773
17778
|
}));
|
|
17774
17779
|
i = 0;
|
|
17775
17780
|
|
|
17776
|
-
case
|
|
17781
|
+
case 8:
|
|
17777
17782
|
if (!(i < ADDRS.length)) {
|
|
17778
|
-
_context23.next =
|
|
17783
|
+
_context23.next = 16;
|
|
17779
17784
|
break;
|
|
17780
17785
|
}
|
|
17781
|
-
return _context23.delegateYield(_loop2(i), "t0",
|
|
17786
|
+
return _context23.delegateYield(_loop2(i), "t0", 10);
|
|
17782
17787
|
|
|
17783
|
-
case
|
|
17788
|
+
case 10:
|
|
17784
17789
|
_ret2 = _context23.t0;
|
|
17785
17790
|
if (!_ret2) {
|
|
17786
|
-
_context23.next =
|
|
17791
|
+
_context23.next = 13;
|
|
17787
17792
|
break;
|
|
17788
17793
|
}
|
|
17789
17794
|
return _context23.abrupt("return", _ret2.v);
|
|
17790
17795
|
|
|
17791
|
-
case
|
|
17796
|
+
case 13:
|
|
17792
17797
|
i += 20;
|
|
17793
|
-
_context23.next =
|
|
17798
|
+
_context23.next = 8;
|
|
17794
17799
|
break;
|
|
17795
17800
|
|
|
17796
|
-
case
|
|
17797
|
-
_context23.next =
|
|
17801
|
+
case 16:
|
|
17802
|
+
_context23.next = 39;
|
|
17798
17803
|
break;
|
|
17799
17804
|
|
|
17800
|
-
case
|
|
17801
|
-
_context23.next =
|
|
17805
|
+
case 18:
|
|
17806
|
+
_context23.next = 20;
|
|
17802
17807
|
return fromTimestampToBlock.fromTimeStampToBlock(toTimestamp(startTime), chain, apiKey);
|
|
17803
17808
|
|
|
17804
|
-
case
|
|
17809
|
+
case 20:
|
|
17805
17810
|
sb = _context23.sent;
|
|
17806
|
-
_context23.next =
|
|
17811
|
+
_context23.next = 23;
|
|
17807
17812
|
return fromTimestampToBlock.fromTimeStampToBlock(toTimestamp(endTime), chain, apiKey);
|
|
17808
17813
|
|
|
17809
|
-
case
|
|
17814
|
+
case 23:
|
|
17810
17815
|
eb = _context23.sent;
|
|
17816
|
+
console.log("sb", sb, "eb", eb);
|
|
17811
17817
|
if (sb) {
|
|
17812
|
-
_context23.next =
|
|
17818
|
+
_context23.next = 27;
|
|
17813
17819
|
break;
|
|
17814
17820
|
}
|
|
17815
17821
|
throw new ValidationError("Invalid startTime: ".concat(startTime));
|
|
17816
17822
|
|
|
17817
|
-
case
|
|
17823
|
+
case 27:
|
|
17818
17824
|
if (eb) {
|
|
17819
|
-
_context23.next =
|
|
17825
|
+
_context23.next = 29;
|
|
17820
17826
|
break;
|
|
17821
17827
|
}
|
|
17822
17828
|
throw new ValidationError("Invalid endTime: ".concat(endTime));
|
|
17823
17829
|
|
|
17824
|
-
case
|
|
17830
|
+
case 29:
|
|
17825
17831
|
_loop3 = _regeneratorRuntime().mark((function _loop3() {
|
|
17826
17832
|
var addr, url, data;
|
|
17827
17833
|
return _regeneratorRuntime().wrap((function _loop3$(_context22) {
|
|
@@ -17861,27 +17867,27 @@ function _typeof(o) {
|
|
|
17861
17867
|
}));
|
|
17862
17868
|
_i16 = 0, _ADDRS = ADDRS;
|
|
17863
17869
|
|
|
17864
|
-
case
|
|
17870
|
+
case 31:
|
|
17865
17871
|
if (!(_i16 < _ADDRS.length)) {
|
|
17866
|
-
_context23.next =
|
|
17872
|
+
_context23.next = 39;
|
|
17867
17873
|
break;
|
|
17868
17874
|
}
|
|
17869
|
-
return _context23.delegateYield(_loop3(), "t1",
|
|
17875
|
+
return _context23.delegateYield(_loop3(), "t1", 33);
|
|
17870
17876
|
|
|
17871
|
-
case
|
|
17877
|
+
case 33:
|
|
17872
17878
|
_ret3 = _context23.t1;
|
|
17873
17879
|
if (!_ret3) {
|
|
17874
|
-
_context23.next =
|
|
17880
|
+
_context23.next = 36;
|
|
17875
17881
|
break;
|
|
17876
17882
|
}
|
|
17877
17883
|
return _context23.abrupt("return", _ret3.v);
|
|
17878
17884
|
|
|
17879
|
-
case
|
|
17885
|
+
case 36:
|
|
17880
17886
|
_i16++;
|
|
17881
|
-
_context23.next =
|
|
17887
|
+
_context23.next = 31;
|
|
17882
17888
|
break;
|
|
17883
17889
|
|
|
17884
|
-
case
|
|
17890
|
+
case 39:
|
|
17885
17891
|
case "end":
|
|
17886
17892
|
return _context23.stop();
|
|
17887
17893
|
}
|