@fileverse-dev/formulajs 4.4.11-mod-89 → 4.4.11-mod-89-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/lib/browser/formula.js +87 -7
- package/lib/browser/formula.min.js +2 -2
- package/lib/browser/formula.min.js.map +1 -1
- package/lib/cjs/index.cjs +44 -0
- package/lib/esm/crypto-constants.mjs +35 -0
- package/lib/esm/index.mjs +44 -1
- package/package.json +1 -1
- package/types/cjs/index.d.cts +32 -0
- package/types/esm/index.d.mts +32 -0
package/lib/browser/formula.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @fileverse-dev/formulajs v4.4.11-mod-89 */
|
|
1
|
+
/* @fileverse-dev/formulajs v4.4.11-mod-89-patch-1 */
|
|
2
2
|
var _excluded = [ "confirmations", "dataDecoded" ];
|
|
3
3
|
|
|
4
4
|
function _objectWithoutProperties(e, t) {
|
|
@@ -18275,15 +18275,94 @@ function _typeof(o) {
|
|
|
18275
18275
|
})));
|
|
18276
18276
|
return _SMARTCONTRACT.apply(this, arguments);
|
|
18277
18277
|
}
|
|
18278
|
+
function GNOSISPAY() {
|
|
18279
|
+
return _GNOSISPAY.apply(this, arguments);
|
|
18280
|
+
}
|
|
18281
|
+
function _GNOSISPAY() {
|
|
18282
|
+
_GNOSISPAY = _asyncToGenerator(_regeneratorRuntime().mark((function _callee28() {
|
|
18283
|
+
var apiKeyKey, API_KEY, url, res, json;
|
|
18284
|
+
return _regeneratorRuntime().wrap((function _callee28$(_context31) {
|
|
18285
|
+
while (1) switch (_context31.prev = _context31.next) {
|
|
18286
|
+
case 0:
|
|
18287
|
+
_context31.prev = 0;
|
|
18288
|
+
apiKeyKey = SERVICES_API_KEY.GnosisPay;
|
|
18289
|
+
API_KEY = window.localStorage.getItem(apiKeyKey);
|
|
18290
|
+
if (API_KEY) {
|
|
18291
|
+
_context31.next = 5;
|
|
18292
|
+
break;
|
|
18293
|
+
}
|
|
18294
|
+
throw new MissingApiKeyError(apiKeyKey);
|
|
18295
|
+
|
|
18296
|
+
case 5:
|
|
18297
|
+
url = new URL("https://api.gnosispay.com/api/v1/transactions");
|
|
18298
|
+
_context31.next = 8;
|
|
18299
|
+
return fetch(url.toString(), {
|
|
18300
|
+
headers: {
|
|
18301
|
+
Authorization: "Bearer ".concat(API_KEY),
|
|
18302
|
+
"Content-Type": "application/json"
|
|
18303
|
+
}
|
|
18304
|
+
});
|
|
18305
|
+
|
|
18306
|
+
case 8:
|
|
18307
|
+
res = _context31.sent;
|
|
18308
|
+
if (res.ok) {
|
|
18309
|
+
_context31.next = 11;
|
|
18310
|
+
break;
|
|
18311
|
+
}
|
|
18312
|
+
throw new NetworkError(apiKeyKey, res.status);
|
|
18313
|
+
|
|
18314
|
+
case 11:
|
|
18315
|
+
_context31.next = 13;
|
|
18316
|
+
return res.json();
|
|
18317
|
+
|
|
18318
|
+
case 13:
|
|
18319
|
+
json = _context31.sent;
|
|
18320
|
+
if (Array.isArray(json)) {
|
|
18321
|
+
_context31.next = 16;
|
|
18322
|
+
break;
|
|
18323
|
+
}
|
|
18324
|
+
return _context31.abrupt("return", []);
|
|
18325
|
+
|
|
18326
|
+
case 16:
|
|
18327
|
+
return _context31.abrupt("return", json.map((function(tx) {
|
|
18328
|
+
return {
|
|
18329
|
+
createdAt: tx.createdAt,
|
|
18330
|
+
clearedAt: tx.clearedAt,
|
|
18331
|
+
country: tx.country,
|
|
18332
|
+
merchant: tx.merchant,
|
|
18333
|
+
billingAmount: tx.billingAmount,
|
|
18334
|
+
billingCurrency: tx.billingCurrency,
|
|
18335
|
+
transactionAmount: tx.transactionAmount,
|
|
18336
|
+
transactionCurrency: tx.transactionCurrency,
|
|
18337
|
+
transactionType: tx.transactionType,
|
|
18338
|
+
kind: tx.kind,
|
|
18339
|
+
status: tx.status || null,
|
|
18340
|
+
mcc: tx.mcc
|
|
18341
|
+
};
|
|
18342
|
+
})));
|
|
18343
|
+
|
|
18344
|
+
case 19:
|
|
18345
|
+
_context31.prev = 19;
|
|
18346
|
+
_context31.t0 = _context31["catch"](0);
|
|
18347
|
+
return _context31.abrupt("return", errorMessageHandler(_context31.t0, "GNOSISPAY"));
|
|
18348
|
+
|
|
18349
|
+
case 22:
|
|
18350
|
+
case "end":
|
|
18351
|
+
return _context31.stop();
|
|
18352
|
+
}
|
|
18353
|
+
}), _callee28, null, [ [ 0, 19 ] ]);
|
|
18354
|
+
})));
|
|
18355
|
+
return _GNOSISPAY.apply(this, arguments);
|
|
18356
|
+
}
|
|
18278
18357
|
function FLVURL() {
|
|
18279
18358
|
return _FLVURL.apply(this, arguments);
|
|
18280
18359
|
}
|
|
18281
18360
|
function _FLVURL() {
|
|
18282
|
-
_FLVURL = _asyncToGenerator(_regeneratorRuntime().mark((function
|
|
18283
|
-
return _regeneratorRuntime().wrap((function
|
|
18284
|
-
while (1) switch (
|
|
18361
|
+
_FLVURL = _asyncToGenerator(_regeneratorRuntime().mark((function _callee29() {
|
|
18362
|
+
return _regeneratorRuntime().wrap((function _callee29$(_context32) {
|
|
18363
|
+
while (1) switch (_context32.prev = _context32.next) {
|
|
18285
18364
|
case 0:
|
|
18286
|
-
return
|
|
18365
|
+
return _context32.abrupt("return", new Promise((function(resolve) {
|
|
18287
18366
|
setTimeout((function() {
|
|
18288
18367
|
resolve([ {
|
|
18289
18368
|
Yoo: "gotcha"
|
|
@@ -18293,9 +18372,9 @@ function _typeof(o) {
|
|
|
18293
18372
|
|
|
18294
18373
|
case 1:
|
|
18295
18374
|
case "end":
|
|
18296
|
-
return
|
|
18375
|
+
return _context32.stop();
|
|
18297
18376
|
}
|
|
18298
|
-
}),
|
|
18377
|
+
}), _callee29);
|
|
18299
18378
|
})));
|
|
18300
18379
|
return _FLVURL.apply(this, arguments);
|
|
18301
18380
|
}
|
|
@@ -18488,6 +18567,7 @@ function _typeof(o) {
|
|
|
18488
18567
|
exports.GEOMEAN = GEOMEAN;
|
|
18489
18568
|
exports.GESTEP = GESTEP;
|
|
18490
18569
|
exports.GNOSIS = GNOSIS;
|
|
18570
|
+
exports.GNOSISPAY = GNOSISPAY;
|
|
18491
18571
|
exports.GROWTH = GROWTH;
|
|
18492
18572
|
exports.HARMEAN = HARMEAN;
|
|
18493
18573
|
exports.HEX2BIN = HEX2BIN;
|