@fileverse-dev/fortune-react 1.0.2-mod-67 → 1.0.2-mod-67-patch-1
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.umd.js +205 -113
- package/dist/index.umd.min.js +7 -7
- package/package.json +2 -2
package/dist/index.umd.js
CHANGED
|
@@ -35304,6 +35304,14 @@
|
|
|
35304
35304
|
gnosis: 100,
|
|
35305
35305
|
base: 8453
|
|
35306
35306
|
};
|
|
35307
|
+
var BLOCKSCOUT_CHAINS_MAP = {
|
|
35308
|
+
ethereum: 'https://eth.blockscout.com',
|
|
35309
|
+
gnosis: 'https://gnosis.blockscout.com',
|
|
35310
|
+
arbitrum: 'https://arbitrum.blockscout.com',
|
|
35311
|
+
optimism: 'https://optimism.blockscout.com',
|
|
35312
|
+
soneium: 'https://soneium.blockscout.com',
|
|
35313
|
+
unichain: 'https://unichain.blockscout.com'
|
|
35314
|
+
};
|
|
35307
35315
|
var SAFE_CHAIN_MAP = {
|
|
35308
35316
|
ethereum: 'eth',
|
|
35309
35317
|
gnosis: 'gno'
|
|
@@ -35349,74 +35357,157 @@
|
|
|
35349
35357
|
return _ref.apply(this, arguments);
|
|
35350
35358
|
};
|
|
35351
35359
|
}();
|
|
35352
|
-
function
|
|
35353
|
-
return
|
|
35360
|
+
function BLOCKSCOUT(_x4, _x5, _x6, _x7, _x8, _x9, _x0) {
|
|
35361
|
+
return _BLOCKSCOUT.apply(this, arguments);
|
|
35354
35362
|
}
|
|
35355
|
-
function
|
|
35356
|
-
|
|
35357
|
-
var
|
|
35363
|
+
function _BLOCKSCOUT() {
|
|
35364
|
+
_BLOCKSCOUT = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(address, chain, type, page, offset, startTimestamp, endTimestamp) {
|
|
35365
|
+
var currentTimestamp, hostname, requestUrl, _json$result, _json$result2, response, json, _t, _t2;
|
|
35358
35366
|
return _regenerator().w(function (_context2) {
|
|
35359
35367
|
while (1) switch (_context2.n) {
|
|
35368
|
+
case 0:
|
|
35369
|
+
if (!chain) {
|
|
35370
|
+
chain = 'ethereum';
|
|
35371
|
+
}
|
|
35372
|
+
if (type) {
|
|
35373
|
+
_context2.n = 1;
|
|
35374
|
+
break;
|
|
35375
|
+
}
|
|
35376
|
+
return _context2.a(2, 'TYPE_MISSING');
|
|
35377
|
+
case 1:
|
|
35378
|
+
if (!startTimestamp) {
|
|
35379
|
+
currentTimestamp = Date.now();
|
|
35380
|
+
startTimestamp = currentTimestamp - 30 * 24 * 60 * 60 * 1000;
|
|
35381
|
+
startTimestamp = Math.floor(startTimestamp / 1000);
|
|
35382
|
+
}
|
|
35383
|
+
hostname = BLOCKSCOUT_CHAINS_MAP[chain];
|
|
35384
|
+
_t = type;
|
|
35385
|
+
_context2.n = _t === 'stat' ? 2 : _t === 'txns' ? 3 : _t === 'tokens' ? 4 : 5;
|
|
35386
|
+
break;
|
|
35387
|
+
case 2:
|
|
35388
|
+
requestUrl = "".concat(hostname, "/api/v2/addresses/").concat(address, "/counters");
|
|
35389
|
+
return _context2.a(3, 6);
|
|
35390
|
+
case 3:
|
|
35391
|
+
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");
|
|
35392
|
+
return _context2.a(3, 6);
|
|
35393
|
+
case 4:
|
|
35394
|
+
requestUrl = "".concat(hostname, "/api?module=account&action=tokenlist&address=").concat(address);
|
|
35395
|
+
return _context2.a(3, 6);
|
|
35396
|
+
case 5:
|
|
35397
|
+
return _context2.a(2, 'INVALID_TYPE');
|
|
35398
|
+
case 6:
|
|
35399
|
+
_context2.p = 6;
|
|
35400
|
+
_context2.n = 7;
|
|
35401
|
+
return fetch(requestUrl);
|
|
35402
|
+
case 7:
|
|
35403
|
+
response = _context2.v;
|
|
35404
|
+
if (response.ok) {
|
|
35405
|
+
_context2.n = 8;
|
|
35406
|
+
break;
|
|
35407
|
+
}
|
|
35408
|
+
throw new Error("HTTP error! Status: ".concat(response.status));
|
|
35409
|
+
case 8:
|
|
35410
|
+
_context2.n = 9;
|
|
35411
|
+
return response.json();
|
|
35412
|
+
case 9:
|
|
35413
|
+
json = _context2.v;
|
|
35414
|
+
console.log(json);
|
|
35415
|
+
if (!(json === null || json === void 0 ? void 0 : (_json$result = json.result) === null || _json$result === void 0 ? void 0 : _json$result.includes('Invalid parameter(s)'))) {
|
|
35416
|
+
_context2.n = 10;
|
|
35417
|
+
break;
|
|
35418
|
+
}
|
|
35419
|
+
return _context2.a(2, "INVALID_REQUEST_PARAMS");
|
|
35420
|
+
case 10:
|
|
35421
|
+
if (!(json === null || json === void 0 ? void 0 : (_json$result2 = json.result) === null || _json$result2 === void 0 ? void 0 : _json$result2.includes('Not found'))) {
|
|
35422
|
+
_context2.n = 11;
|
|
35423
|
+
break;
|
|
35424
|
+
}
|
|
35425
|
+
return _context2.a(2, "ADDRESS_NOT_FOUND");
|
|
35426
|
+
case 11:
|
|
35427
|
+
if (!(type === 'stat')) {
|
|
35428
|
+
_context2.n = 12;
|
|
35429
|
+
break;
|
|
35430
|
+
}
|
|
35431
|
+
return _context2.a(2, [json]);
|
|
35432
|
+
case 12:
|
|
35433
|
+
return _context2.a(2, json.result);
|
|
35434
|
+
case 13:
|
|
35435
|
+
_context2.p = 13;
|
|
35436
|
+
_t2 = _context2.v;
|
|
35437
|
+
return _context2.a(2, 'ERROR IN FETCHING');
|
|
35438
|
+
}
|
|
35439
|
+
}, _callee2, null, [[6, 13]]);
|
|
35440
|
+
}));
|
|
35441
|
+
return _BLOCKSCOUT.apply(this, arguments);
|
|
35442
|
+
}
|
|
35443
|
+
function ETHERSCAN(_x1, _x10, _x11) {
|
|
35444
|
+
return _ETHERSCAN.apply(this, arguments);
|
|
35445
|
+
}
|
|
35446
|
+
function _ETHERSCAN() {
|
|
35447
|
+
_ETHERSCAN = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(address, page, offset) {
|
|
35448
|
+
var API_KEY, url, response, json, _t3;
|
|
35449
|
+
return _regenerator().w(function (_context3) {
|
|
35450
|
+
while (1) switch (_context3.n) {
|
|
35360
35451
|
case 0:
|
|
35361
35452
|
API_KEY = window.localStorage.getItem(SERVICE_API_KEY.Etherscan);
|
|
35362
35453
|
if (API_KEY) {
|
|
35363
|
-
|
|
35454
|
+
_context3.n = 1;
|
|
35364
35455
|
break;
|
|
35365
35456
|
}
|
|
35366
|
-
return
|
|
35457
|
+
return _context3.a(2, "".concat(SERVICE_API_KEY.Etherscan).concat(ERROR_MESSAGES_FLAG.MISSING_KEY));
|
|
35367
35458
|
case 1:
|
|
35368
35459
|
if (!(API_KEY === 'xxxx')) {
|
|
35369
|
-
|
|
35460
|
+
_context3.n = 2;
|
|
35370
35461
|
break;
|
|
35371
35462
|
}
|
|
35372
|
-
return
|
|
35463
|
+
return _context3.a(2, "".concat(SERVICE_API_KEY.Etherscan).concat(ERROR_MESSAGES_FLAG.RATE_LIMIT));
|
|
35373
35464
|
case 2:
|
|
35374
35465
|
url = "https://api.etherscan.io/v2/api?chainid=1&module=account&action=txlist&address=".concat(address, "&startblock=0&endblock=99999999&page=").concat(page || 1, "&offset=").concat(offset || 10, "&sort=asc&apikey=").concat(API_KEY);
|
|
35375
|
-
|
|
35376
|
-
|
|
35466
|
+
_context3.p = 3;
|
|
35467
|
+
_context3.n = 4;
|
|
35377
35468
|
return fetch(url);
|
|
35378
35469
|
case 4:
|
|
35379
|
-
response =
|
|
35470
|
+
response = _context3.v;
|
|
35380
35471
|
if (response.ok) {
|
|
35381
|
-
|
|
35472
|
+
_context3.n = 5;
|
|
35382
35473
|
break;
|
|
35383
35474
|
}
|
|
35384
35475
|
throw new Error("HTTP error! Status: ".concat(response.status));
|
|
35385
35476
|
case 5:
|
|
35386
|
-
|
|
35477
|
+
_context3.n = 6;
|
|
35387
35478
|
return response.json();
|
|
35388
35479
|
case 6:
|
|
35389
|
-
json =
|
|
35480
|
+
json = _context3.v;
|
|
35390
35481
|
if (!json.result.includes("Invalid API Key")) {
|
|
35391
|
-
|
|
35482
|
+
_context3.n = 7;
|
|
35392
35483
|
break;
|
|
35393
35484
|
}
|
|
35394
|
-
return
|
|
35485
|
+
return _context3.a(2, "".concat(SERVICE_API_KEY.Etherscan).concat(ERROR_MESSAGES_FLAG.INVALID_API_KEY));
|
|
35395
35486
|
case 7:
|
|
35396
35487
|
if (!json.result.includes('Max rate limit reached')) {
|
|
35397
|
-
|
|
35488
|
+
_context3.n = 8;
|
|
35398
35489
|
break;
|
|
35399
35490
|
}
|
|
35400
|
-
return
|
|
35491
|
+
return _context3.a(2, "".concat(SERVICE_API_KEY.Etherscan).concat(ERROR_MESSAGES_FLAG.RATE_LIMIT));
|
|
35401
35492
|
case 8:
|
|
35402
|
-
return
|
|
35493
|
+
return _context3.a(2, json.result);
|
|
35403
35494
|
case 9:
|
|
35404
|
-
|
|
35405
|
-
|
|
35406
|
-
return
|
|
35495
|
+
_context3.p = 9;
|
|
35496
|
+
_t3 = _context3.v;
|
|
35497
|
+
return _context3.a(2, ERROR_MESSAGES_FLAG.DEFAULT);
|
|
35407
35498
|
}
|
|
35408
|
-
},
|
|
35499
|
+
}, _callee3, null, [[3, 9]]);
|
|
35409
35500
|
}));
|
|
35410
35501
|
return _ETHERSCAN.apply(this, arguments);
|
|
35411
35502
|
}
|
|
35412
|
-
function COINGECKO(
|
|
35503
|
+
function COINGECKO(_x12, _x13) {
|
|
35413
35504
|
return _COINGECKO.apply(this, arguments);
|
|
35414
35505
|
}
|
|
35415
35506
|
function _COINGECKO() {
|
|
35416
|
-
_COINGECKO = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function
|
|
35417
|
-
var API_KEY, url, options, response, json, jsonResponse, output, _i10, _Object$entries, _Object$entries$_i, coin, prices, _i11, _Object$entries2, _Object$entries2$_i, currency, _value5, key,
|
|
35418
|
-
return _regenerator().w(function (
|
|
35419
|
-
while (1) switch (
|
|
35507
|
+
_COINGECKO = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(token, vs_currencies) {
|
|
35508
|
+
var API_KEY, url, options, response, json, jsonResponse, output, _i10, _Object$entries, _Object$entries$_i, coin, prices, _i11, _Object$entries2, _Object$entries2$_i, currency, _value5, key, _t4;
|
|
35509
|
+
return _regenerator().w(function (_context4) {
|
|
35510
|
+
while (1) switch (_context4.n) {
|
|
35420
35511
|
case 0:
|
|
35421
35512
|
API_KEY = window.localStorage.getItem(SERVICE_API_KEY.Coingecko);
|
|
35422
35513
|
url = "https://api.coingecko.com/api/v3/simple/price?vs_currencies=".concat(vs_currencies, "&ids=").concat(token);
|
|
@@ -35427,35 +35518,35 @@
|
|
|
35427
35518
|
'x-cg-demo-api-key': "".concat(API_KEY)
|
|
35428
35519
|
}
|
|
35429
35520
|
};
|
|
35430
|
-
|
|
35431
|
-
|
|
35521
|
+
_context4.p = 1;
|
|
35522
|
+
_context4.n = 2;
|
|
35432
35523
|
return fetch(url, options);
|
|
35433
35524
|
case 2:
|
|
35434
|
-
response =
|
|
35525
|
+
response = _context4.v;
|
|
35435
35526
|
if (response.ok) {
|
|
35436
|
-
|
|
35527
|
+
_context4.n = 5;
|
|
35437
35528
|
break;
|
|
35438
35529
|
}
|
|
35439
|
-
|
|
35530
|
+
_context4.n = 3;
|
|
35440
35531
|
return response.json();
|
|
35441
35532
|
case 3:
|
|
35442
|
-
json =
|
|
35533
|
+
json = _context4.v;
|
|
35443
35534
|
if (!json.status.error_message.includes("API Key Missing")) {
|
|
35444
|
-
|
|
35535
|
+
_context4.n = 4;
|
|
35445
35536
|
break;
|
|
35446
35537
|
}
|
|
35447
|
-
return
|
|
35538
|
+
return _context4.a(2, "".concat(SERVICE_API_KEY.Coingecko).concat(ERROR_MESSAGES_FLAG.INVALID_API_KEY));
|
|
35448
35539
|
case 4:
|
|
35449
35540
|
if (!(response.status === 429)) {
|
|
35450
|
-
|
|
35541
|
+
_context4.n = 5;
|
|
35451
35542
|
break;
|
|
35452
35543
|
}
|
|
35453
|
-
return
|
|
35544
|
+
return _context4.a(2, "".concat(SERVICE_API_KEY.Coingecko).concat(ERROR_MESSAGES_FLAG.RATE_LIMIT));
|
|
35454
35545
|
case 5:
|
|
35455
|
-
|
|
35546
|
+
_context4.n = 6;
|
|
35456
35547
|
return response.json();
|
|
35457
35548
|
case 6:
|
|
35458
|
-
jsonResponse =
|
|
35549
|
+
jsonResponse = _context4.v;
|
|
35459
35550
|
// Free Coingecko API does not require API key, not need to handle API key error
|
|
35460
35551
|
output = {};
|
|
35461
35552
|
for (_i10 = 0, _Object$entries = Object.entries(jsonResponse); _i10 < _Object$entries.length; _i10++) {
|
|
@@ -35469,24 +35560,24 @@
|
|
|
35469
35560
|
/*
|
|
35470
35561
|
[{Bitcon_usd: 1, Bitcoin_eur: 1},{Ethereum_usd: 1, Ethereum_eur: 1}}]
|
|
35471
35562
|
*/
|
|
35472
|
-
return
|
|
35563
|
+
return _context4.a(2, [output]);
|
|
35473
35564
|
case 7:
|
|
35474
|
-
|
|
35475
|
-
|
|
35476
|
-
return
|
|
35565
|
+
_context4.p = 7;
|
|
35566
|
+
_t4 = _context4.v;
|
|
35567
|
+
return _context4.a(2, ERROR_MESSAGES_FLAG.DEFAULT);
|
|
35477
35568
|
}
|
|
35478
|
-
},
|
|
35569
|
+
}, _callee4, null, [[1, 7]]);
|
|
35479
35570
|
}));
|
|
35480
35571
|
return _COINGECKO.apply(this, arguments);
|
|
35481
35572
|
}
|
|
35482
|
-
function EOA(
|
|
35573
|
+
function EOA(_x14, _x15, _x16, _x17, _x18) {
|
|
35483
35574
|
return _EOA.apply(this, arguments);
|
|
35484
35575
|
}
|
|
35485
35576
|
function _EOA() {
|
|
35486
|
-
_EOA = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function
|
|
35487
|
-
var API_KEYS, apiKey, chainId, action, timeQuery, startBlock, endBlock, url, _json$
|
|
35488
|
-
return _regenerator().w(function (
|
|
35489
|
-
while (1) switch (
|
|
35577
|
+
_EOA = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(address, categories, chain, startTime, endTime) {
|
|
35578
|
+
var API_KEYS, apiKey, chainId, action, timeQuery, startBlock, endBlock, url, _json$result3, _json$result3$include, response, json, _t5;
|
|
35579
|
+
return _regenerator().w(function (_context5) {
|
|
35580
|
+
while (1) switch (_context5.n) {
|
|
35490
35581
|
case 0:
|
|
35491
35582
|
API_KEYS = {
|
|
35492
35583
|
ethereum: window.localStorage.getItem(SERVICE_API_KEY.Etherscan),
|
|
@@ -35496,10 +35587,10 @@
|
|
|
35496
35587
|
apiKey = API_KEYS[chain];
|
|
35497
35588
|
chainId = CHAIN_ID_MAP[chain];
|
|
35498
35589
|
if (!(!apiKey || !chainId)) {
|
|
35499
|
-
|
|
35590
|
+
_context5.n = 1;
|
|
35500
35591
|
break;
|
|
35501
35592
|
}
|
|
35502
|
-
return
|
|
35593
|
+
return _context5.a(2, "".concat(chain.toUpperCase(), "_MISSING"));
|
|
35503
35594
|
case 1:
|
|
35504
35595
|
action = '';
|
|
35505
35596
|
if (categories === 'txns') action = 'account.txlist';else {
|
|
@@ -35507,79 +35598,79 @@
|
|
|
35507
35598
|
}
|
|
35508
35599
|
timeQuery = '';
|
|
35509
35600
|
if (!(!isNaN(startTime) && !isNaN(endTime))) {
|
|
35510
|
-
|
|
35601
|
+
_context5.n = 4;
|
|
35511
35602
|
break;
|
|
35512
35603
|
}
|
|
35513
|
-
|
|
35604
|
+
_context5.n = 2;
|
|
35514
35605
|
return fromTimeStampToBlock(startTime, chain, apiKey);
|
|
35515
35606
|
case 2:
|
|
35516
|
-
startBlock =
|
|
35517
|
-
|
|
35607
|
+
startBlock = _context5.v;
|
|
35608
|
+
_context5.n = 3;
|
|
35518
35609
|
return fromTimeStampToBlock(endTime, chain, apiKey);
|
|
35519
35610
|
case 3:
|
|
35520
|
-
endBlock =
|
|
35611
|
+
endBlock = _context5.v;
|
|
35521
35612
|
timeQuery = "&startblock=".concat(startBlock, "&endblock=").concat(endBlock);
|
|
35522
|
-
|
|
35613
|
+
_context5.n = 6;
|
|
35523
35614
|
break;
|
|
35524
35615
|
case 4:
|
|
35525
35616
|
if (!(categories === 'balance')) {
|
|
35526
|
-
|
|
35617
|
+
_context5.n = 5;
|
|
35527
35618
|
break;
|
|
35528
35619
|
}
|
|
35529
35620
|
timeQuery = "&tag=latest";
|
|
35530
|
-
|
|
35621
|
+
_context5.n = 6;
|
|
35531
35622
|
break;
|
|
35532
35623
|
case 5:
|
|
35533
35624
|
throw new Error('Start and End Time is required for querying transaction list ');
|
|
35534
35625
|
case 6:
|
|
35535
35626
|
url = "https://api.etherscan.io/v2/api?module=".concat(action.split('.')[0], "&action=").concat(action.split('.')[1], "&address=").concat(address, "&sort=asc&chainid=").concat(chainId, "&apikey=").concat(apiKey).concat(timeQuery);
|
|
35536
|
-
|
|
35537
|
-
|
|
35627
|
+
_context5.p = 7;
|
|
35628
|
+
_context5.n = 8;
|
|
35538
35629
|
return fetch(url);
|
|
35539
35630
|
case 8:
|
|
35540
|
-
response =
|
|
35631
|
+
response = _context5.v;
|
|
35541
35632
|
if (response.ok) {
|
|
35542
|
-
|
|
35633
|
+
_context5.n = 9;
|
|
35543
35634
|
break;
|
|
35544
35635
|
}
|
|
35545
35636
|
throw new Error("HTTP error! Status: ".concat(response.status));
|
|
35546
35637
|
case 9:
|
|
35547
|
-
|
|
35638
|
+
_context5.n = 10;
|
|
35548
35639
|
return response.json();
|
|
35549
35640
|
case 10:
|
|
35550
|
-
json =
|
|
35551
|
-
if (!((_json$
|
|
35552
|
-
|
|
35641
|
+
json = _context5.v;
|
|
35642
|
+
if (!((_json$result3 = json.result) === null || _json$result3 === void 0 ? void 0 : (_json$result3$include = _json$result3.includes) === null || _json$result3$include === void 0 ? void 0 : _json$result3$include.call(_json$result3, "Invalid API Key"))) {
|
|
35643
|
+
_context5.n = 11;
|
|
35553
35644
|
break;
|
|
35554
35645
|
}
|
|
35555
|
-
return
|
|
35646
|
+
return _context5.a(2, "".concat(SERVICE_API_KEY[chain.charAt(0).toUpperCase() + chain.slice(1)], "_MISSING"));
|
|
35556
35647
|
case 11:
|
|
35557
35648
|
if (!json.result.includes('Max rate limit reached')) {
|
|
35558
|
-
|
|
35649
|
+
_context5.n = 12;
|
|
35559
35650
|
break;
|
|
35560
35651
|
}
|
|
35561
|
-
return
|
|
35652
|
+
return _context5.a(2, "".concat(SERVICE_API_KEY.Etherscan).concat(ERROR_MESSAGES_FLAG.RATE_LIMIT));
|
|
35562
35653
|
case 12:
|
|
35563
|
-
return
|
|
35654
|
+
return _context5.a(2, json.result);
|
|
35564
35655
|
case 13:
|
|
35565
|
-
|
|
35566
|
-
|
|
35567
|
-
console.log(
|
|
35568
|
-
return
|
|
35656
|
+
_context5.p = 13;
|
|
35657
|
+
_t5 = _context5.v;
|
|
35658
|
+
console.log(_t5);
|
|
35659
|
+
return _context5.a(2, ERROR_MESSAGES_FLAG.DEFAULT);
|
|
35569
35660
|
}
|
|
35570
|
-
},
|
|
35661
|
+
}, _callee5, null, [[7, 13]]);
|
|
35571
35662
|
}));
|
|
35572
35663
|
return _EOA.apply(this, arguments);
|
|
35573
35664
|
}
|
|
35574
|
-
function FLVURL(
|
|
35665
|
+
function FLVURL(_x19, _x20) {
|
|
35575
35666
|
return _FLVURL.apply(this, arguments);
|
|
35576
35667
|
}
|
|
35577
35668
|
function _FLVURL() {
|
|
35578
|
-
_FLVURL = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function
|
|
35579
|
-
return _regenerator().w(function (
|
|
35580
|
-
while (1) switch (
|
|
35669
|
+
_FLVURL = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(token, vs_currencies) {
|
|
35670
|
+
return _regenerator().w(function (_context6) {
|
|
35671
|
+
while (1) switch (_context6.n) {
|
|
35581
35672
|
case 0:
|
|
35582
|
-
return
|
|
35673
|
+
return _context6.a(2, new Promise(function (resolve) {
|
|
35583
35674
|
setTimeout(function () {
|
|
35584
35675
|
resolve([{
|
|
35585
35676
|
"Yoo": "gotcha"
|
|
@@ -35587,90 +35678,90 @@
|
|
|
35587
35678
|
}, 10000);
|
|
35588
35679
|
}));
|
|
35589
35680
|
}
|
|
35590
|
-
},
|
|
35681
|
+
}, _callee6);
|
|
35591
35682
|
}));
|
|
35592
35683
|
return _FLVURL.apply(this, arguments);
|
|
35593
35684
|
}
|
|
35594
|
-
function SAFE(
|
|
35685
|
+
function SAFE(_x21, _x22, _x23, _x24, _x25) {
|
|
35595
35686
|
return _SAFE.apply(this, arguments);
|
|
35596
35687
|
}
|
|
35597
35688
|
function _SAFE() {
|
|
35598
|
-
_SAFE = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function
|
|
35599
|
-
var apiKey, chainIdentifier, url, response, json,
|
|
35600
|
-
return _regenerator().w(function (
|
|
35601
|
-
while (1) switch (
|
|
35689
|
+
_SAFE = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7(address, utility, chain, limit, offset) {
|
|
35690
|
+
var apiKey, chainIdentifier, url, response, json, _t6;
|
|
35691
|
+
return _regenerator().w(function (_context7) {
|
|
35692
|
+
while (1) switch (_context7.n) {
|
|
35602
35693
|
case 0:
|
|
35603
35694
|
if (!(typeof limit !== 'number' || limit < 0)) {
|
|
35604
|
-
|
|
35695
|
+
_context7.n = 1;
|
|
35605
35696
|
break;
|
|
35606
35697
|
}
|
|
35607
|
-
return
|
|
35698
|
+
return _context7.a(2, 'INVALID_LIMIT');
|
|
35608
35699
|
case 1:
|
|
35609
35700
|
if (!(typeof offset !== 'number' || offset < 0)) {
|
|
35610
|
-
|
|
35701
|
+
_context7.n = 2;
|
|
35611
35702
|
break;
|
|
35612
35703
|
}
|
|
35613
|
-
return
|
|
35704
|
+
return _context7.a(2, 'INVALID_OFFSET');
|
|
35614
35705
|
case 2:
|
|
35615
35706
|
if (!(utility !== 'txns')) {
|
|
35616
|
-
|
|
35707
|
+
_context7.n = 3;
|
|
35617
35708
|
break;
|
|
35618
35709
|
}
|
|
35619
|
-
return
|
|
35710
|
+
return _context7.a(2, 'UTILITY IS NOT SUPPORTED');
|
|
35620
35711
|
case 3:
|
|
35621
35712
|
apiKey = window.localStorage.getItem(SERVICE_API_KEY.Safe);
|
|
35622
35713
|
chainIdentifier = SAFE_CHAIN_MAP[chain];
|
|
35623
35714
|
if (apiKey) {
|
|
35624
|
-
|
|
35715
|
+
_context7.n = 4;
|
|
35625
35716
|
break;
|
|
35626
35717
|
}
|
|
35627
|
-
return
|
|
35718
|
+
return _context7.a(2, "".concat(SERVICE_API_KEY.Safe, "_MISSING"));
|
|
35628
35719
|
case 4:
|
|
35629
35720
|
if (chainIdentifier) {
|
|
35630
|
-
|
|
35721
|
+
_context7.n = 5;
|
|
35631
35722
|
break;
|
|
35632
35723
|
}
|
|
35633
|
-
return
|
|
35724
|
+
return _context7.a(2, 'CHAIN IS NOT SUPPORTED');
|
|
35634
35725
|
case 5:
|
|
35635
35726
|
url = "https://api.safe.global/tx-service/".concat(chainIdentifier, "/api/v2/safes/").concat(address, "/multisig-transactions?limit=").concat(limit, "&offset=").concat(offset);
|
|
35636
|
-
|
|
35637
|
-
|
|
35727
|
+
_context7.p = 6;
|
|
35728
|
+
_context7.n = 7;
|
|
35638
35729
|
return fetch(url, {
|
|
35639
35730
|
headers: {
|
|
35640
35731
|
'Authorization': "Bearer ".concat(apiKey)
|
|
35641
35732
|
}
|
|
35642
35733
|
});
|
|
35643
35734
|
case 7:
|
|
35644
|
-
response =
|
|
35735
|
+
response = _context7.v;
|
|
35645
35736
|
if (response.ok) {
|
|
35646
|
-
|
|
35737
|
+
_context7.n = 8;
|
|
35647
35738
|
break;
|
|
35648
35739
|
}
|
|
35649
35740
|
throw new Error("HTTP error! Status: ".concat(response.status));
|
|
35650
35741
|
case 8:
|
|
35651
|
-
|
|
35742
|
+
_context7.n = 9;
|
|
35652
35743
|
return response.json();
|
|
35653
35744
|
case 9:
|
|
35654
|
-
json =
|
|
35745
|
+
json = _context7.v;
|
|
35655
35746
|
if (Array.isArray(json.results)) {
|
|
35656
|
-
|
|
35747
|
+
_context7.n = 10;
|
|
35657
35748
|
break;
|
|
35658
35749
|
}
|
|
35659
|
-
return
|
|
35750
|
+
return _context7.a(2, "INVALID API RESPONSE");
|
|
35660
35751
|
case 10:
|
|
35661
|
-
return
|
|
35752
|
+
return _context7.a(2, json.results.map(function (_ref2) {
|
|
35662
35753
|
var confirmations = _ref2.confirmations,
|
|
35663
35754
|
dataDecoded = _ref2.dataDecoded,
|
|
35664
35755
|
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
35665
35756
|
return rest;
|
|
35666
35757
|
}));
|
|
35667
35758
|
case 11:
|
|
35668
|
-
|
|
35669
|
-
|
|
35670
|
-
console.log(
|
|
35671
|
-
return
|
|
35759
|
+
_context7.p = 11;
|
|
35760
|
+
_t6 = _context7.v;
|
|
35761
|
+
console.log(_t6);
|
|
35762
|
+
return _context7.a(2, "ERROR IN FETCHING");
|
|
35672
35763
|
}
|
|
35673
|
-
},
|
|
35764
|
+
}, _callee7, null, [[6, 11]]);
|
|
35674
35765
|
}));
|
|
35675
35766
|
return _SAFE.apply(this, arguments);
|
|
35676
35767
|
}
|
|
@@ -35719,6 +35810,7 @@
|
|
|
35719
35810
|
BITOR: BITOR,
|
|
35720
35811
|
BITRSHIFT: BITRSHIFT,
|
|
35721
35812
|
BITXOR: BITXOR,
|
|
35813
|
+
BLOCKSCOUT: BLOCKSCOUT,
|
|
35722
35814
|
CEILING: CEILING,
|
|
35723
35815
|
CEILINGMATH: CEILINGMATH,
|
|
35724
35816
|
CEILINGPRECISE: CEILINGPRECISE,
|