@fileverse-dev/formulajs 4.4.11-mod-27 → 4.4.11-mod-28
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 +122 -152
- package/lib/browser/formula.min.js +3 -3
- package/lib/browser/formula.min.js.map +1 -1
- package/lib/cjs/index.cjs +64 -58
- package/lib/esm/crypto-constants.mjs +72 -58
- package/lib/esm/index.mjs +64 -58
- package/package.json +1 -1
- package/types/cjs/index.d.cts +2 -2
- package/types/esm/index.d.mts +2 -2
package/lib/browser/formula.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @fileverse-dev/formulajs v4.4.11-mod-
|
|
1
|
+
/* @fileverse-dev/formulajs v4.4.11-mod-28 */
|
|
2
2
|
var _excluded = [ "confirmations", "dataDecoded" ];
|
|
3
3
|
|
|
4
4
|
function _objectWithoutProperties(e, t) {
|
|
@@ -10994,6 +10994,11 @@ function _typeof(o) {
|
|
|
10994
10994
|
return _ref.apply(this, arguments);
|
|
10995
10995
|
};
|
|
10996
10996
|
}();
|
|
10997
|
+
function toTimestamp(dateStr) {
|
|
10998
|
+
var _dateStr$split$map = dateStr.split("/").map(Number), _dateStr$split$map2 = _slicedToArray(_dateStr$split$map, 3), day = _dateStr$split$map2[0], month = _dateStr$split$map2[1], year = _dateStr$split$map2[2];
|
|
10999
|
+
var date = new Date(year, month - 1, day);
|
|
11000
|
+
return Math.floor(date.getTime() / 1e3);
|
|
11001
|
+
}
|
|
10997
11002
|
function handleScanRequest(_x4) {
|
|
10998
11003
|
return _handleScanRequest.apply(this, arguments);
|
|
10999
11004
|
}
|
|
@@ -11063,7 +11068,7 @@ function _typeof(o) {
|
|
|
11063
11068
|
break;
|
|
11064
11069
|
}
|
|
11065
11070
|
_context2.next = 23;
|
|
11066
|
-
return Promise.all([ fromTimeStampToBlock(startDate, chain, API_KEY), fromTimeStampToBlock(endDate, chain, API_KEY) ]);
|
|
11071
|
+
return Promise.all([ fromTimeStampToBlock(toTimestamp(startDate), chain, API_KEY), fromTimeStampToBlock(toTimestamp(endDate), chain, API_KEY) ]);
|
|
11067
11072
|
|
|
11068
11073
|
case 23:
|
|
11069
11074
|
_yield$Promise$all = _context2.sent;
|
|
@@ -11128,11 +11133,6 @@ function _typeof(o) {
|
|
|
11128
11133
|
})));
|
|
11129
11134
|
return _handleScanRequest.apply(this, arguments);
|
|
11130
11135
|
}
|
|
11131
|
-
function toTimestamp(dateStr) {
|
|
11132
|
-
var _dateStr$split$map = dateStr.split("/").map(Number), _dateStr$split$map2 = _slicedToArray(_dateStr$split$map, 3), day = _dateStr$split$map2[0], month = _dateStr$split$map2[1], year = _dateStr$split$map2[2];
|
|
11133
|
-
var date = new Date(year, month - 1, day);
|
|
11134
|
-
return Math.floor(date.getTime() / 1e3);
|
|
11135
|
-
}
|
|
11136
11136
|
var sha3 = {
|
|
11137
11137
|
exports: {}
|
|
11138
11138
|
};
|
|
@@ -11898,138 +11898,102 @@ function _typeof(o) {
|
|
|
11898
11898
|
}
|
|
11899
11899
|
function _FIREFLY() {
|
|
11900
11900
|
_FIREFLY = _asyncToGenerator(_regeneratorRuntime().mark((function _callee4(platform, contentType, identifier) {
|
|
11901
|
-
var
|
|
11901
|
+
var _typeMap$platform;
|
|
11902
|
+
var start, end, API_KEY, baseUrl, headers, typeMap, platformType, query, url, res, json, _args4 = arguments;
|
|
11902
11903
|
return _regeneratorRuntime().wrap((function _callee4$(_context4) {
|
|
11903
11904
|
while (1) switch (_context4.prev = _context4.next) {
|
|
11904
11905
|
case 0:
|
|
11906
|
+
start = _args4.length > 3 && _args4[3] !== undefined ? _args4[3] : 0;
|
|
11907
|
+
end = _args4.length > 4 && _args4[4] !== undefined ? _args4[4] : 10;
|
|
11905
11908
|
API_KEY = window.localStorage.getItem(SERVICE_API_KEY.Firefly);
|
|
11906
11909
|
if (API_KEY) {
|
|
11907
|
-
_context4.next =
|
|
11910
|
+
_context4.next = 5;
|
|
11908
11911
|
break;
|
|
11909
11912
|
}
|
|
11910
11913
|
return _context4.abrupt("return", "".concat(SERVICE_API_KEY.Firefly).concat(ERROR_MESSAGES_FLAG.MISSING_KEY));
|
|
11911
11914
|
|
|
11912
|
-
case
|
|
11915
|
+
case 5:
|
|
11913
11916
|
baseUrl = "https://openapi.firefly.land/v1/fileverse/fetch";
|
|
11914
11917
|
headers = {
|
|
11915
11918
|
"x-api-key": API_KEY
|
|
11916
11919
|
};
|
|
11917
|
-
|
|
11918
|
-
|
|
11919
|
-
|
|
11920
|
-
|
|
11921
|
-
|
|
11922
|
-
|
|
11923
|
-
|
|
11924
|
-
|
|
11925
|
-
|
|
11926
|
-
|
|
11927
|
-
}
|
|
11928
|
-
|
|
11929
|
-
|
|
11930
|
-
|
|
11931
|
-
break;
|
|
11932
|
-
|
|
11933
|
-
case 14:
|
|
11934
|
-
if (!(contentType === "replies")) {
|
|
11935
|
-
_context4.next = 19;
|
|
11936
|
-
break;
|
|
11937
|
-
}
|
|
11938
|
-
type = "farcasterpostid";
|
|
11939
|
-
query = normalizedId.startsWith("0x") ? normalizedId : Number(normalizedId).toString();
|
|
11940
|
-
_context4.next = 20;
|
|
11941
|
-
break;
|
|
11942
|
-
|
|
11943
|
-
case 19:
|
|
11944
|
-
return _context4.abrupt("return", "".concat(SERVICE_API_KEY.Firefly).concat(ERROR_MESSAGES_FLAG.INVALID_TYPE));
|
|
11945
|
-
|
|
11946
|
-
case 20:
|
|
11947
|
-
_context4.next = 37;
|
|
11948
|
-
break;
|
|
11949
|
-
|
|
11950
|
-
case 22:
|
|
11951
|
-
if (!(platform === "lens")) {
|
|
11952
|
-
_context4.next = 36;
|
|
11953
|
-
break;
|
|
11954
|
-
}
|
|
11955
|
-
if (!(contentType === "posts")) {
|
|
11956
|
-
_context4.next = 28;
|
|
11957
|
-
break;
|
|
11958
|
-
}
|
|
11959
|
-
type = "lensid";
|
|
11960
|
-
query = normalizedId;
|
|
11961
|
-
_context4.next = 34;
|
|
11962
|
-
break;
|
|
11963
|
-
|
|
11964
|
-
case 28:
|
|
11965
|
-
if (!(contentType === "replies")) {
|
|
11966
|
-
_context4.next = 33;
|
|
11920
|
+
typeMap = {
|
|
11921
|
+
farcaster: {
|
|
11922
|
+
posts: "farcasterid",
|
|
11923
|
+
replies: "farcasterpostid",
|
|
11924
|
+
channels: "farcasterchannels"
|
|
11925
|
+
},
|
|
11926
|
+
lens: {
|
|
11927
|
+
posts: "lensid",
|
|
11928
|
+
replies: "lenspostid"
|
|
11929
|
+
}
|
|
11930
|
+
};
|
|
11931
|
+
platformType = (_typeMap$platform = typeMap[platform]) === null || _typeMap$platform === void 0 ? void 0 : _typeMap$platform[contentType];
|
|
11932
|
+
if (platformType) {
|
|
11933
|
+
_context4.next = 11;
|
|
11967
11934
|
break;
|
|
11968
11935
|
}
|
|
11969
|
-
type = "lenspostid";
|
|
11970
|
-
query = normalizedId;
|
|
11971
|
-
_context4.next = 34;
|
|
11972
|
-
break;
|
|
11973
|
-
|
|
11974
|
-
case 33:
|
|
11975
11936
|
return _context4.abrupt("return", "".concat(SERVICE_API_KEY.Firefly).concat(ERROR_MESSAGES_FLAG.INVALID_TYPE));
|
|
11976
11937
|
|
|
11977
|
-
case
|
|
11978
|
-
|
|
11979
|
-
|
|
11980
|
-
|
|
11981
|
-
case 36:
|
|
11982
|
-
return _context4.abrupt("return", "".concat(SERVICE_API_KEY.Firefly).concat(ERROR_MESSAGES_FLAG.INVALID_PARAM));
|
|
11983
|
-
|
|
11984
|
-
case 37:
|
|
11938
|
+
case 11:
|
|
11939
|
+
query = identifier.split(",").map((function(s) {
|
|
11940
|
+
return s.trim();
|
|
11941
|
+
})).filter(Boolean).join(",");
|
|
11985
11942
|
url = new URL(baseUrl);
|
|
11986
11943
|
url.searchParams.set("query", query);
|
|
11987
|
-
url.searchParams.set("type",
|
|
11988
|
-
url.searchParams.set("
|
|
11989
|
-
url.searchParams.set("
|
|
11990
|
-
_context4.prev =
|
|
11991
|
-
_context4.next =
|
|
11944
|
+
url.searchParams.set("type", platformType);
|
|
11945
|
+
url.searchParams.set("start", String(start));
|
|
11946
|
+
url.searchParams.set("end", String(end));
|
|
11947
|
+
_context4.prev = 17;
|
|
11948
|
+
_context4.next = 20;
|
|
11992
11949
|
return fetch(url.toString(), {
|
|
11993
11950
|
headers: headers
|
|
11994
11951
|
});
|
|
11995
11952
|
|
|
11996
|
-
case
|
|
11953
|
+
case 20:
|
|
11997
11954
|
res = _context4.sent;
|
|
11998
11955
|
if (res.ok) {
|
|
11999
|
-
_context4.next =
|
|
11956
|
+
_context4.next = 23;
|
|
12000
11957
|
break;
|
|
12001
11958
|
}
|
|
12002
11959
|
throw new Error("HTTP ".concat(res.status));
|
|
12003
11960
|
|
|
12004
|
-
case
|
|
12005
|
-
_context4.next =
|
|
11961
|
+
case 23:
|
|
11962
|
+
_context4.next = 25;
|
|
12006
11963
|
return res.json();
|
|
12007
11964
|
|
|
12008
|
-
case
|
|
11965
|
+
case 25:
|
|
12009
11966
|
json = _context4.sent;
|
|
12010
|
-
|
|
12011
|
-
|
|
12012
|
-
|
|
12013
|
-
|
|
12014
|
-
|
|
12015
|
-
text: (item === null || item === void 0 ? void 0 : item.text) || (item === null || item === void 0 || (_item$metadata = item.metadata) === null || _item$metadata === void 0 || (_item$metadata = _item$metadata.content) === null || _item$metadata === void 0 ? void 0 : _item$metadata.content) || "",
|
|
12016
|
-
createdAt: (item === null || item === void 0 ? void 0 : item.createdAt) || "",
|
|
12017
|
-
platform: platform
|
|
12018
|
-
};
|
|
12019
|
-
})) : [];
|
|
12020
|
-
return _context4.abrupt("return", flattened);
|
|
11967
|
+
if (Array.isArray(json === null || json === void 0 ? void 0 : json.data)) {
|
|
11968
|
+
_context4.next = 28;
|
|
11969
|
+
break;
|
|
11970
|
+
}
|
|
11971
|
+
return _context4.abrupt("return", []);
|
|
12021
11972
|
|
|
12022
|
-
case
|
|
12023
|
-
_context4.
|
|
12024
|
-
|
|
11973
|
+
case 28:
|
|
11974
|
+
return _context4.abrupt("return", json.data.map((function(item) {
|
|
11975
|
+
var flat = {};
|
|
11976
|
+
for (var _i10 = 0, _Object$entries = Object.entries(item); _i10 < _Object$entries.length; _i10++) {
|
|
11977
|
+
var _Object$entries$_i = _slicedToArray(_Object$entries[_i10], 2), key = _Object$entries$_i[0], _value5 = _Object$entries$_i[1];
|
|
11978
|
+
if (_typeof(_value5) !== "object" || _value5 === null) {
|
|
11979
|
+
flat[key] = _value5;
|
|
11980
|
+
}
|
|
11981
|
+
}
|
|
11982
|
+
flat.platform = platform;
|
|
11983
|
+
return flat;
|
|
11984
|
+
})));
|
|
11985
|
+
|
|
11986
|
+
case 31:
|
|
11987
|
+
_context4.prev = 31;
|
|
11988
|
+
_context4.t0 = _context4["catch"](17);
|
|
12025
11989
|
console.error("FIREFLY fetch error:", _context4.t0);
|
|
12026
11990
|
return _context4.abrupt("return", ERROR_MESSAGES_FLAG.DEFAULT);
|
|
12027
11991
|
|
|
12028
|
-
case
|
|
11992
|
+
case 35:
|
|
12029
11993
|
case "end":
|
|
12030
11994
|
return _context4.stop();
|
|
12031
11995
|
}
|
|
12032
|
-
}), _callee4, null, [ [
|
|
11996
|
+
}), _callee4, null, [ [ 17, 31 ] ]);
|
|
12033
11997
|
})));
|
|
12034
11998
|
return _FIREFLY.apply(this, arguments);
|
|
12035
11999
|
}
|
|
@@ -12057,79 +12021,85 @@ function _typeof(o) {
|
|
|
12057
12021
|
startTimestamp = currentTimestamp - 30 * 24 * 60 * 60 * 1e3;
|
|
12058
12022
|
startTimestamp = Math.floor(startTimestamp / 1e3);
|
|
12059
12023
|
}
|
|
12024
|
+
if (isNaN(startTimestamp)) {
|
|
12025
|
+
startTimestamp = toTimestamp(startTimestamp);
|
|
12026
|
+
}
|
|
12027
|
+
if (isNaN(endTimestamp) && endTimestamp) {
|
|
12028
|
+
endTimestamp = toTimestamp(endTimestamp);
|
|
12029
|
+
}
|
|
12060
12030
|
hostname = BLOCKSCOUT_CHAINS_MAP[chain];
|
|
12061
12031
|
_context5.t0 = type;
|
|
12062
|
-
_context5.next = _context5.t0 === "stat" ?
|
|
12032
|
+
_context5.next = _context5.t0 === "stat" ? 10 : _context5.t0 === "txns" ? 12 : _context5.t0 === "tokens" ? 14 : 16;
|
|
12063
12033
|
break;
|
|
12064
12034
|
|
|
12065
|
-
case
|
|
12035
|
+
case 10:
|
|
12066
12036
|
requestUrl = "".concat(hostname, "/api/v2/addresses/").concat(address, "/counters");
|
|
12067
|
-
return _context5.abrupt("break",
|
|
12037
|
+
return _context5.abrupt("break", 17);
|
|
12068
12038
|
|
|
12069
|
-
case
|
|
12039
|
+
case 12:
|
|
12070
12040
|
requestUrl = "".concat(hostname, "/api?module=account&action=txlist&address=").concat(address, "&start_timestamp=").concat(startTimestamp, "&end_timestamp=").concat(endTimestamp, "&page=").concat(page, "&offset=").concat(offset, "&sort=asc");
|
|
12071
|
-
return _context5.abrupt("break",
|
|
12041
|
+
return _context5.abrupt("break", 17);
|
|
12072
12042
|
|
|
12073
|
-
case
|
|
12043
|
+
case 14:
|
|
12074
12044
|
requestUrl = "".concat(hostname, "/api?module=account&action=tokenlist&address=").concat(address);
|
|
12075
|
-
return _context5.abrupt("break",
|
|
12045
|
+
return _context5.abrupt("break", 17);
|
|
12076
12046
|
|
|
12077
|
-
case
|
|
12047
|
+
case 16:
|
|
12078
12048
|
return _context5.abrupt("return", "INVALID_TYPE");
|
|
12079
12049
|
|
|
12080
|
-
case
|
|
12081
|
-
_context5.prev =
|
|
12082
|
-
_context5.next =
|
|
12050
|
+
case 17:
|
|
12051
|
+
_context5.prev = 17;
|
|
12052
|
+
_context5.next = 20;
|
|
12083
12053
|
return fetch(requestUrl);
|
|
12084
12054
|
|
|
12085
|
-
case
|
|
12055
|
+
case 20:
|
|
12086
12056
|
response = _context5.sent;
|
|
12087
12057
|
if (response.ok) {
|
|
12088
|
-
_context5.next =
|
|
12058
|
+
_context5.next = 23;
|
|
12089
12059
|
break;
|
|
12090
12060
|
}
|
|
12091
12061
|
throw new Error("HTTP error! Status: ".concat(response.status));
|
|
12092
12062
|
|
|
12093
|
-
case
|
|
12094
|
-
_context5.next =
|
|
12063
|
+
case 23:
|
|
12064
|
+
_context5.next = 25;
|
|
12095
12065
|
return response.json();
|
|
12096
12066
|
|
|
12097
|
-
case
|
|
12067
|
+
case 25:
|
|
12098
12068
|
json = _context5.sent;
|
|
12099
12069
|
console.log(json);
|
|
12100
12070
|
if (!(json !== null && json !== void 0 && (_json$result = json.result) !== null && _json$result !== void 0 && _json$result.includes("Invalid parameter(s)"))) {
|
|
12101
|
-
_context5.next =
|
|
12071
|
+
_context5.next = 29;
|
|
12102
12072
|
break;
|
|
12103
12073
|
}
|
|
12104
12074
|
return _context5.abrupt("return", "INVALID_REQUEST_PARAMS");
|
|
12105
12075
|
|
|
12106
|
-
case
|
|
12076
|
+
case 29:
|
|
12107
12077
|
if (!(json !== null && json !== void 0 && (_json$result2 = json.result) !== null && _json$result2 !== void 0 && _json$result2.includes("Not found"))) {
|
|
12108
|
-
_context5.next =
|
|
12078
|
+
_context5.next = 31;
|
|
12109
12079
|
break;
|
|
12110
12080
|
}
|
|
12111
12081
|
return _context5.abrupt("return", "ADDRESS_NOT_FOUND");
|
|
12112
12082
|
|
|
12113
|
-
case
|
|
12083
|
+
case 31:
|
|
12114
12084
|
if (!(type === "stat")) {
|
|
12115
|
-
_context5.next =
|
|
12085
|
+
_context5.next = 33;
|
|
12116
12086
|
break;
|
|
12117
12087
|
}
|
|
12118
12088
|
return _context5.abrupt("return", [ json ]);
|
|
12119
12089
|
|
|
12120
|
-
case
|
|
12090
|
+
case 33:
|
|
12121
12091
|
return _context5.abrupt("return", json.result);
|
|
12122
12092
|
|
|
12123
|
-
case
|
|
12124
|
-
_context5.prev =
|
|
12125
|
-
_context5.t1 = _context5["catch"](
|
|
12093
|
+
case 36:
|
|
12094
|
+
_context5.prev = 36;
|
|
12095
|
+
_context5.t1 = _context5["catch"](17);
|
|
12126
12096
|
return _context5.abrupt("return", "ERROR IN FETCHING");
|
|
12127
12097
|
|
|
12128
|
-
case
|
|
12098
|
+
case 39:
|
|
12129
12099
|
case "end":
|
|
12130
12100
|
return _context5.stop();
|
|
12131
12101
|
}
|
|
12132
|
-
}), _callee5, null, [ [
|
|
12102
|
+
}), _callee5, null, [ [ 17, 36 ] ]);
|
|
12133
12103
|
})));
|
|
12134
12104
|
return _BLOCKSCOUT.apply(this, arguments);
|
|
12135
12105
|
}
|
|
@@ -12280,11 +12250,11 @@ function _typeof(o) {
|
|
|
12280
12250
|
})));
|
|
12281
12251
|
return _NEYNAR.apply(this, arguments);
|
|
12282
12252
|
}
|
|
12283
|
-
function
|
|
12284
|
-
return
|
|
12253
|
+
function GNOSISPAY(_x19) {
|
|
12254
|
+
return _GNOSISPAY.apply(this, arguments);
|
|
12285
12255
|
}
|
|
12286
|
-
function
|
|
12287
|
-
|
|
12256
|
+
function _GNOSISPAY() {
|
|
12257
|
+
_GNOSISPAY = _asyncToGenerator(_regeneratorRuntime().mark((function _callee9(_ref3) {
|
|
12288
12258
|
var cardId, startDate, endDate, _ref3$limit, limit, _ref3$offset, offset, apiKeyKey, API_KEY, url, res, json;
|
|
12289
12259
|
return _regeneratorRuntime().wrap((function _callee9$(_context9) {
|
|
12290
12260
|
while (1) switch (_context9.prev = _context9.next) {
|
|
@@ -12311,10 +12281,10 @@ function _typeof(o) {
|
|
|
12311
12281
|
url = new URL("https://api.gnosispay.com/cards/".concat(cardId, "/transactions"));
|
|
12312
12282
|
url.searchParams.set("limit", limit.toString());
|
|
12313
12283
|
url.searchParams.set("offset", offset.toString());
|
|
12314
|
-
if (!isNaN(startDate)) {
|
|
12284
|
+
if (!isNaN(toTimestamp(startDate))) {
|
|
12315
12285
|
url.searchParams.set("startDate", new Date(startDate * 1e3).toISOString());
|
|
12316
12286
|
}
|
|
12317
|
-
if (!isNaN(endDate)) {
|
|
12287
|
+
if (!isNaN(toTimestamp(endDate))) {
|
|
12318
12288
|
url.searchParams.set("endDate", new Date(endDate * 1e3).toISOString());
|
|
12319
12289
|
}
|
|
12320
12290
|
_context9.prev = 12;
|
|
@@ -12376,7 +12346,7 @@ function _typeof(o) {
|
|
|
12376
12346
|
}
|
|
12377
12347
|
}), _callee9, null, [ [ 12, 26 ] ]);
|
|
12378
12348
|
})));
|
|
12379
|
-
return
|
|
12349
|
+
return _GNOSISPAY.apply(this, arguments);
|
|
12380
12350
|
}
|
|
12381
12351
|
function ETHERSCAN() {
|
|
12382
12352
|
return _ETHERSCAN.apply(this, arguments);
|
|
@@ -12417,7 +12387,7 @@ function _typeof(o) {
|
|
|
12417
12387
|
}
|
|
12418
12388
|
function _COINGECKO() {
|
|
12419
12389
|
_COINGECKO = _asyncToGenerator(_regeneratorRuntime().mark((function _callee1(category, param1, param2) {
|
|
12420
|
-
var page, perPage, API_KEY, headers, url, token, vsCurrencies, ecosystemMap, key, categoryVal, trend, _category, _trend, exchange, response, json, _json$status, message, output,
|
|
12390
|
+
var page, perPage, API_KEY, headers, url, token, vsCurrencies, ecosystemMap, key, categoryVal, trend, _category, _trend, exchange, response, json, _json$status, message, output, _i11, _Object$entries2, _Object$entries2$_i, _token, prices, _i12, _Object$entries3, _Object$entries3$_i, currency, _value6, _key5, flatArray, _args1 = arguments;
|
|
12421
12391
|
return _regeneratorRuntime().wrap((function _callee1$(_context1) {
|
|
12422
12392
|
while (1) switch (_context1.prev = _context1.next) {
|
|
12423
12393
|
case 0:
|
|
@@ -12535,14 +12505,14 @@ function _typeof(o) {
|
|
|
12535
12505
|
break;
|
|
12536
12506
|
}
|
|
12537
12507
|
output = {};
|
|
12538
|
-
for (
|
|
12539
|
-
_Object$
|
|
12540
|
-
prices = _Object$
|
|
12541
|
-
for (
|
|
12542
|
-
_Object$
|
|
12543
|
-
|
|
12508
|
+
for (_i11 = 0, _Object$entries2 = Object.entries(json); _i11 < _Object$entries2.length; _i11++) {
|
|
12509
|
+
_Object$entries2$_i = _slicedToArray(_Object$entries2[_i11], 2), _token = _Object$entries2$_i[0],
|
|
12510
|
+
prices = _Object$entries2$_i[1];
|
|
12511
|
+
for (_i12 = 0, _Object$entries3 = Object.entries(prices); _i12 < _Object$entries3.length; _i12++) {
|
|
12512
|
+
_Object$entries3$_i = _slicedToArray(_Object$entries3[_i12], 2), currency = _Object$entries3$_i[0],
|
|
12513
|
+
_value6 = _Object$entries3$_i[1];
|
|
12544
12514
|
_key5 = "".concat(_token.charAt(0).toUpperCase() + _token.slice(1), "_").concat(currency.toUpperCase());
|
|
12545
|
-
output[_key5] =
|
|
12515
|
+
output[_key5] = _value6;
|
|
12546
12516
|
}
|
|
12547
12517
|
}
|
|
12548
12518
|
return _context1.abrupt("return", [ output ]);
|
|
@@ -12551,10 +12521,10 @@ function _typeof(o) {
|
|
|
12551
12521
|
flatArray = Array.isArray(json) ? json : [ json ];
|
|
12552
12522
|
return _context1.abrupt("return", flatArray.map((function(item) {
|
|
12553
12523
|
var flat = {};
|
|
12554
|
-
for (var
|
|
12555
|
-
var _Object$
|
|
12556
|
-
if (_typeof(
|
|
12557
|
-
flat[_key6] =
|
|
12524
|
+
for (var _i13 = 0, _Object$entries4 = Object.entries(item); _i13 < _Object$entries4.length; _i13++) {
|
|
12525
|
+
var _Object$entries4$_i = _slicedToArray(_Object$entries4[_i13], 2), _key6 = _Object$entries4$_i[0], _value7 = _Object$entries4$_i[1];
|
|
12526
|
+
if (_typeof(_value7) !== "object" || _value7 === null) {
|
|
12527
|
+
flat[_key6] = _value7;
|
|
12558
12528
|
}
|
|
12559
12529
|
}
|
|
12560
12530
|
return flat;
|
|
@@ -12721,7 +12691,7 @@ function _typeof(o) {
|
|
|
12721
12691
|
_iterator2 = _createForOfIteratorHelper(CHAINS);
|
|
12722
12692
|
_context13.prev = 42;
|
|
12723
12693
|
_loop = _regeneratorRuntime().mark((function _loop() {
|
|
12724
|
-
var chain, chainId, i, slice, action, url, _data, startBlock, endBlock, _loop2, _ret2,
|
|
12694
|
+
var chain, chainId, i, slice, action, url, _data, startBlock, endBlock, _loop2, _ret2, _i14, _ADDRS;
|
|
12725
12695
|
return _regeneratorRuntime().wrap((function _loop$(_context11) {
|
|
12726
12696
|
while (1) switch (_context11.prev = _context11.next) {
|
|
12727
12697
|
case 0:
|
|
@@ -12800,7 +12770,7 @@ function _typeof(o) {
|
|
|
12800
12770
|
return _regeneratorRuntime().wrap((function _loop2$(_context10) {
|
|
12801
12771
|
while (1) switch (_context10.prev = _context10.next) {
|
|
12802
12772
|
case 0:
|
|
12803
|
-
addr = _ADDRS[
|
|
12773
|
+
addr = _ADDRS[_i14];
|
|
12804
12774
|
url = "https://api.etherscan.io/v2/api?chainid=".concat(chainId) + "&module=account&action=txlist&address=".concat(addr) + "&startblock=".concat(startBlock, "&endblock=").concat(endBlock) + "&page=".concat(page, "&offset=").concat(offset, "&sort=asc&apikey=").concat(API_KEY);
|
|
12805
12775
|
_context10.next = 4;
|
|
12806
12776
|
return fetchJSON(url);
|
|
@@ -12832,10 +12802,10 @@ function _typeof(o) {
|
|
|
12832
12802
|
}
|
|
12833
12803
|
}), _loop2);
|
|
12834
12804
|
}));
|
|
12835
|
-
|
|
12805
|
+
_i14 = 0, _ADDRS = ADDRS;
|
|
12836
12806
|
|
|
12837
12807
|
case 29:
|
|
12838
|
-
if (!(
|
|
12808
|
+
if (!(_i14 < _ADDRS.length)) {
|
|
12839
12809
|
_context11.next = 37;
|
|
12840
12810
|
break;
|
|
12841
12811
|
}
|
|
@@ -12850,7 +12820,7 @@ function _typeof(o) {
|
|
|
12850
12820
|
return _context11.abrupt("return", _ret2.v);
|
|
12851
12821
|
|
|
12852
12822
|
case 34:
|
|
12853
|
-
|
|
12823
|
+
_i14++;
|
|
12854
12824
|
_context11.next = 29;
|
|
12855
12825
|
break;
|
|
12856
12826
|
|
|
@@ -13204,7 +13174,7 @@ function _typeof(o) {
|
|
|
13204
13174
|
exports.GCD = GCD;
|
|
13205
13175
|
exports.GEOMEAN = GEOMEAN;
|
|
13206
13176
|
exports.GESTEP = GESTEP;
|
|
13207
|
-
exports.
|
|
13177
|
+
exports.GNOSISPAY = GNOSISPAY;
|
|
13208
13178
|
exports.GNOSISSCAN = GNOSISSCAN;
|
|
13209
13179
|
exports.GROWTH = GROWTH;
|
|
13210
13180
|
exports.HARMEAN = HARMEAN;
|