@depay/widgets 10.2.12 → 10.2.13
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/esm/index.bundle.js +1 -1
- package/dist/esm/index.js +16 -10
- package/dist/umd/index.bundle.js +1 -1
- package/dist/umd/index.js +16 -10
- package/package.json +1 -1
package/dist/umd/index.js
CHANGED
|
@@ -24979,6 +24979,8 @@
|
|
|
24979
24979
|
}());
|
|
24980
24980
|
};
|
|
24981
24981
|
|
|
24982
|
+
var SUPPORTED_CURRENCIES = ["all", "xcd", "eur", "bbd", "btn", "bnd", "xaf", "cup", "usd", "fkp", "gip", "huf", "irr", "jmd", "aud", "lak", "lyd", "mkd", "xof", "nzd", "omr", "pgk", "rwf", "wst", "rsd", "sek", "tzs", "amd", "bsd", "bam", "cve", "cny", "crc", "czk", "ern", "gel", "htg", "inr", "jod", "krw", "lbp", "mwk", "mru", "mzn", "ang", "pen", "qar", "std", "sll", "sos", "sdg", "syp", "aoa", "awg", "bhd", "bzd", "bwp", "bif", "kyd", "cop", "dkk", "gtq", "hnl", "idr", "ils", "kzt", "kwd", "lsl", "myr", "mur", "mnt", "mmk", "ngn", "pab", "php", "ron", "sar", "sgd", "zar", "srd", "twd", "top", "vef", "dzd", "ars", "azn", "bob", "bgn", "cad", "clp", "cdf", "dop", "fjd", "gmd", "gyd", "isk", "iqd", "jpy", "kpw", "chf", "mga", "mdl", "mad", "npr", "nio", "pkr", "pyg", "shp", "scr", "sbd", "lkr", "thb", "try", "aed", "vuv", "yer", "afn", "bdt", "brl", "khr", "kmf", "hrk", "djf", "egp", "etb", "xpf", "ghs", "gnf", "hkd", "xdr", "kes", "kgs", "lrd", "mop", "mvr", "mxn", "nad", "nok", "pln", "rub", "szl", "tjs", "ttd", "ugx", "uyu", "vnd", "tnd", "uah", "uzs", "tmt", "gbp", "zmw", "byn", "bmd", "ggp", "clf", "cuc", "imp", "jep", "svc", "xag", "zwl"];
|
|
24983
|
+
|
|
24982
24984
|
var PaymentAmountRoutingContext = /*#__PURE__*/React__default["default"].createContext();
|
|
24983
24985
|
|
|
24984
24986
|
var PaymentAmountRoutingProvider = (function (props) {
|
|
@@ -25054,7 +25056,8 @@
|
|
|
25054
25056
|
var _useContext = React.useContext(ConfigurationContext),
|
|
25055
25057
|
currencyCode = _useContext.currencyCode,
|
|
25056
25058
|
recover = _useContext.recover,
|
|
25057
|
-
amountConfiguration = _useContext.amount
|
|
25059
|
+
amountConfiguration = _useContext.amount,
|
|
25060
|
+
currency = _useContext.currency;
|
|
25058
25061
|
var _useContext2 = React.useContext(PaymentContext),
|
|
25059
25062
|
payment = _useContext2.payment,
|
|
25060
25063
|
paymentState = _useContext2.paymentState;
|
|
@@ -25168,7 +25171,7 @@
|
|
|
25168
25171
|
className: "TokenSymbolCell"
|
|
25169
25172
|
}, payment.symbol), /*#__PURE__*/React__default["default"].createElement("span", null, "\xA0"), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
25170
25173
|
className: "TokenAmountCell"
|
|
25171
|
-
}, format(payment.amount))), displayedPaymentValue != "".concat(payment.symbol, " ").concat(format(payment.amount)) && !(amountsMissing && !fixedCurrency) && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
25174
|
+
}, format(payment.amount))), displayedPaymentValue != "".concat(payment.symbol, " ").concat(format(payment.amount)) && !(amountsMissing && !fixedCurrency) && currency !== false && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
25172
25175
|
className: "TokenAmountRow small grey"
|
|
25173
25176
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
25174
25177
|
className: "TokenAmountCell"
|
|
@@ -25333,13 +25336,16 @@
|
|
|
25333
25336
|
case 0:
|
|
25334
25337
|
accept = _ref3.accept, amount = _ref3.amount, sent = _ref3.sent, succeeded = _ref3.succeeded, validated = _ref3.validated, failed = _ref3.failed, error = _ref3.error, critical = _ref3.critical, style = _ref3.style, whitelist = _ref3.whitelist, blacklist = _ref3.blacklist, providers = _ref3.providers, currency = _ref3.currency, connected = _ref3.connected, closed = _ref3.closed, track = _ref3.track, fee = _ref3.fee, recover = _ref3.recover, closable = _ref3.closable, integration = _ref3.integration, link = _ref3.link, container = _ref3.container, before = _ref3.before, wallet = _ref3.wallet, document = _ref3.document;
|
|
25335
25338
|
requireReactVersion();
|
|
25336
|
-
|
|
25337
|
-
|
|
25339
|
+
if (currency && !SUPPORTED_CURRENCIES.includes(currency.toLowerCase())) {
|
|
25340
|
+
currency = false;
|
|
25341
|
+
}
|
|
25342
|
+
_context2.prev = 3;
|
|
25343
|
+
_context2.next = 6;
|
|
25338
25344
|
return preflight$1({
|
|
25339
25345
|
accept: accept,
|
|
25340
25346
|
recover: recover
|
|
25341
25347
|
});
|
|
25342
|
-
case
|
|
25348
|
+
case 6:
|
|
25343
25349
|
if (typeof window._depayUnmountLoading == 'function') {
|
|
25344
25350
|
window._depayUnmountLoading();
|
|
25345
25351
|
}
|
|
@@ -25406,18 +25412,18 @@
|
|
|
25406
25412
|
return _context2.abrupt("return", {
|
|
25407
25413
|
unmount: unmount
|
|
25408
25414
|
});
|
|
25409
|
-
case
|
|
25410
|
-
_context2.prev =
|
|
25411
|
-
_context2.t0 = _context2["catch"](
|
|
25415
|
+
case 11:
|
|
25416
|
+
_context2.prev = 11;
|
|
25417
|
+
_context2.t0 = _context2["catch"](3);
|
|
25412
25418
|
console.log('critical error', _context2.t0);
|
|
25413
25419
|
if (critical != undefined) {
|
|
25414
25420
|
critical(_context2.t0);
|
|
25415
25421
|
}
|
|
25416
|
-
case
|
|
25422
|
+
case 15:
|
|
25417
25423
|
case "end":
|
|
25418
25424
|
return _context2.stop();
|
|
25419
25425
|
}
|
|
25420
|
-
}, _callee2, null, [[
|
|
25426
|
+
}, _callee2, null, [[3, 11]]);
|
|
25421
25427
|
}));
|
|
25422
25428
|
return function Payment(_x2) {
|
|
25423
25429
|
return _ref4.apply(this, arguments);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depay/widgets",
|
|
3
3
|
"moduleName": "DePayWidgets",
|
|
4
|
-
"version": "10.2.
|
|
4
|
+
"version": "10.2.13",
|
|
5
5
|
"description": "Web3 Payments with any token. DePay simplifies and improves Web3 Payments with the power of DeFi. Accept any token with on-the-fly conversion.",
|
|
6
6
|
"main": "./dist/umd/index.js",
|
|
7
7
|
"module": "./dist/esm/index.js",
|