@fileverse-dev/formulajs 4.4.21-price-and-wallet-3 → 4.4.21-price-and-wallet-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/lib/browser/formula.js +17 -24
- package/lib/browser/formula.min.js +2 -2
- package/lib/browser/formula.min.js.map +1 -1
- package/lib/cjs/index.cjs +5 -9
- package/lib/esm/index.mjs +5 -9
- package/package.json +1 -1
package/lib/browser/formula.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @fileverse-dev/formulajs v4.4.21-price-and-wallet-
|
|
1
|
+
/* @fileverse-dev/formulajs v4.4.21-price-and-wallet-5 */
|
|
2
2
|
var _excluded = [ "confirmations", "dataDecoded" ];
|
|
3
3
|
|
|
4
4
|
function _objectWithoutProperties(e, t) {
|
|
@@ -19084,7 +19084,7 @@ function _typeof(o) {
|
|
|
19084
19084
|
}
|
|
19085
19085
|
function _PRICE() {
|
|
19086
19086
|
_PRICE = _asyncToGenerator(_regeneratorRuntime().mark((function _callee32() {
|
|
19087
|
-
var _argsToArray33, _argsToArray34, input1, input2, input3, baseUrl, url, returnSingleValue, tokenAddress, coin, res, errorData,
|
|
19087
|
+
var _argsToArray33, _argsToArray34, input1, input2, input3, baseUrl, url, returnSingleValue, tokenAddress, coin, res, errorData, _data9, _args36 = arguments;
|
|
19088
19088
|
return _regeneratorRuntime().wrap((function _callee32$(_context36) {
|
|
19089
19089
|
while (1) switch (_context36.prev = _context36.next) {
|
|
19090
19090
|
case 0:
|
|
@@ -19106,11 +19106,12 @@ function _typeof(o) {
|
|
|
19106
19106
|
url += "&time=".concat(encodeURIComponent(input3));
|
|
19107
19107
|
}
|
|
19108
19108
|
} else {
|
|
19109
|
-
coin = input1;
|
|
19109
|
+
coin = input1.replace(/\s+/g, "");
|
|
19110
19110
|
url += "&coin=".concat(encodeURIComponent(coin));
|
|
19111
19111
|
if (input2) {
|
|
19112
19112
|
url += "&time=".concat(encodeURIComponent(input2));
|
|
19113
|
-
|
|
19113
|
+
url += "&coin=".concat(encodeURIComponent(coin));
|
|
19114
|
+
} else if (coin.split(",") === 1) {
|
|
19114
19115
|
returnSingleValue = true;
|
|
19115
19116
|
}
|
|
19116
19117
|
}
|
|
@@ -19142,27 +19143,26 @@ function _typeof(o) {
|
|
|
19142
19143
|
return res.json();
|
|
19143
19144
|
|
|
19144
19145
|
case 19:
|
|
19145
|
-
|
|
19146
|
-
_data9 = json.price;
|
|
19146
|
+
_data9 = _context36.sent;
|
|
19147
19147
|
if (!returnSingleValue) {
|
|
19148
|
-
_context36.next =
|
|
19148
|
+
_context36.next = 22;
|
|
19149
19149
|
break;
|
|
19150
19150
|
}
|
|
19151
19151
|
return _context36.abrupt("return", _data9[0].price);
|
|
19152
19152
|
|
|
19153
|
-
case
|
|
19153
|
+
case 22:
|
|
19154
19154
|
return _context36.abrupt("return", _data9);
|
|
19155
19155
|
|
|
19156
|
-
case
|
|
19157
|
-
_context36.prev =
|
|
19156
|
+
case 25:
|
|
19157
|
+
_context36.prev = 25;
|
|
19158
19158
|
_context36.t0 = _context36["catch"](0);
|
|
19159
19159
|
return _context36.abrupt("return", errorMessageHandler(_context36.t0, "PRICE"));
|
|
19160
19160
|
|
|
19161
|
-
case
|
|
19161
|
+
case 28:
|
|
19162
19162
|
case "end":
|
|
19163
19163
|
return _context36.stop();
|
|
19164
19164
|
}
|
|
19165
|
-
}), _callee32, null, [ [ 0,
|
|
19165
|
+
}), _callee32, null, [ [ 0, 25 ] ]);
|
|
19166
19166
|
})));
|
|
19167
19167
|
return _PRICE.apply(this, arguments);
|
|
19168
19168
|
}
|
|
@@ -19294,25 +19294,18 @@ function _typeof(o) {
|
|
|
19294
19294
|
|
|
19295
19295
|
case 21:
|
|
19296
19296
|
json = _context37.sent;
|
|
19297
|
-
|
|
19298
|
-
_context37.next = 24;
|
|
19299
|
-
break;
|
|
19300
|
-
}
|
|
19301
|
-
return _context37.abrupt("return", json.transactions);
|
|
19302
|
-
|
|
19303
|
-
case 24:
|
|
19304
|
-
return _context37.abrupt("return", json.balances);
|
|
19297
|
+
return _context37.abrupt("return", json);
|
|
19305
19298
|
|
|
19306
|
-
case
|
|
19307
|
-
_context37.prev =
|
|
19299
|
+
case 25:
|
|
19300
|
+
_context37.prev = 25;
|
|
19308
19301
|
_context37.t0 = _context37["catch"](0);
|
|
19309
19302
|
return _context37.abrupt("return", errorMessageHandler(_context37.t0, "WALLET"));
|
|
19310
19303
|
|
|
19311
|
-
case
|
|
19304
|
+
case 28:
|
|
19312
19305
|
case "end":
|
|
19313
19306
|
return _context37.stop();
|
|
19314
19307
|
}
|
|
19315
|
-
}), _callee33, null, [ [ 0,
|
|
19308
|
+
}), _callee33, null, [ [ 0, 25 ] ]);
|
|
19316
19309
|
})));
|
|
19317
19310
|
return _WALLET.apply(this, arguments);
|
|
19318
19311
|
}
|