@depay/widgets 10.2.12 → 10.2.14
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 +2 -2
- package/dist/esm/index.js +30 -17
- package/dist/umd/index.bundle.js +2 -2
- package/dist/umd/index.js +30 -17
- package/package.json +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -23651,11 +23651,18 @@ var Footer = (function () {
|
|
|
23651
23651
|
var approvalButton = function approvalButton() {
|
|
23652
23652
|
if (payment.route == undefined || !payment.route.approvalRequired || payment.route.directTransfer || updatedRouteWithNewPrice) {
|
|
23653
23653
|
return null;
|
|
23654
|
+
} else if (paymentValueLoss) {
|
|
23655
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
23656
|
+
className: "PaddingBottomXS"
|
|
23657
|
+
}, /*#__PURE__*/React.createElement("button", {
|
|
23658
|
+
className: "ButtonPrimary disabled",
|
|
23659
|
+
onClick: function onClick() {},
|
|
23660
|
+
title: "Allow ".concat(payment.symbol, " to be used as payment")
|
|
23661
|
+
}, "Approve use of ", payment.symbol));
|
|
23654
23662
|
} else if (paymentState == 'initialized') {
|
|
23655
23663
|
return /*#__PURE__*/React.createElement("div", {
|
|
23656
23664
|
className: "PaddingBottomXS"
|
|
23657
23665
|
}, /*#__PURE__*/React.createElement("button", {
|
|
23658
|
-
disabled: paymentValueLoss,
|
|
23659
23666
|
className: "ButtonPrimary",
|
|
23660
23667
|
onClick: approve,
|
|
23661
23668
|
title: "Allow ".concat(payment.symbol, " to be used as payment")
|
|
@@ -23685,11 +23692,7 @@ var Footer = (function () {
|
|
|
23685
23692
|
}
|
|
23686
23693
|
}, "Reload"));
|
|
23687
23694
|
} else if (paymentValueLoss) {
|
|
23688
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("
|
|
23689
|
-
className: "PaddingBottomXS"
|
|
23690
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
23691
|
-
className: "Alert"
|
|
23692
|
-
}, /*#__PURE__*/React.createElement("strong", null, "Payment would lose ", paymentValueLoss, "% of its value!"))), /*#__PURE__*/React.createElement("button", {
|
|
23695
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("button", {
|
|
23693
23696
|
className: "ButtonPrimary disabled",
|
|
23694
23697
|
onClick: function onClick() {}
|
|
23695
23698
|
}, "Pay"));
|
|
@@ -23745,7 +23748,11 @@ var Footer = (function () {
|
|
|
23745
23748
|
}
|
|
23746
23749
|
}
|
|
23747
23750
|
};
|
|
23748
|
-
return /*#__PURE__*/React.createElement("div", null,
|
|
23751
|
+
return /*#__PURE__*/React.createElement("div", null, paymentValueLoss && /*#__PURE__*/React.createElement("div", {
|
|
23752
|
+
className: "PaddingBottomXS"
|
|
23753
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
23754
|
+
className: "Alert"
|
|
23755
|
+
}, /*#__PURE__*/React.createElement("strong", null, "Payment would lose ", paymentValueLoss, "% of its value!"))), approvalButton(), additionalPaymentInformation(), mainAction());
|
|
23749
23756
|
});
|
|
23750
23757
|
|
|
23751
23758
|
var DonationOverviewDialog = (function (props) {
|
|
@@ -24983,6 +24990,8 @@ var Login = function Login(options) {
|
|
|
24983
24990
|
}());
|
|
24984
24991
|
};
|
|
24985
24992
|
|
|
24993
|
+
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"];
|
|
24994
|
+
|
|
24986
24995
|
var PaymentAmountRoutingContext = /*#__PURE__*/React.createContext();
|
|
24987
24996
|
|
|
24988
24997
|
var PaymentAmountRoutingProvider = (function (props) {
|
|
@@ -25058,7 +25067,8 @@ var PaymentOverviewDialog = (function (props) {
|
|
|
25058
25067
|
var _useContext = useContext(ConfigurationContext),
|
|
25059
25068
|
currencyCode = _useContext.currencyCode,
|
|
25060
25069
|
recover = _useContext.recover,
|
|
25061
|
-
amountConfiguration = _useContext.amount
|
|
25070
|
+
amountConfiguration = _useContext.amount,
|
|
25071
|
+
currency = _useContext.currency;
|
|
25062
25072
|
var _useContext2 = useContext(PaymentContext),
|
|
25063
25073
|
payment = _useContext2.payment,
|
|
25064
25074
|
paymentState = _useContext2.paymentState;
|
|
@@ -25172,7 +25182,7 @@ var PaymentOverviewDialog = (function (props) {
|
|
|
25172
25182
|
className: "TokenSymbolCell"
|
|
25173
25183
|
}, payment.symbol), /*#__PURE__*/React.createElement("span", null, "\xA0"), /*#__PURE__*/React.createElement("span", {
|
|
25174
25184
|
className: "TokenAmountCell"
|
|
25175
|
-
}, format(payment.amount))), displayedPaymentValue != "".concat(payment.symbol, " ").concat(format(payment.amount)) && !(amountsMissing && !fixedCurrency) && /*#__PURE__*/React.createElement("div", {
|
|
25185
|
+
}, format(payment.amount))), displayedPaymentValue != "".concat(payment.symbol, " ").concat(format(payment.amount)) && !(amountsMissing && !fixedCurrency) && currency !== false && /*#__PURE__*/React.createElement("div", {
|
|
25176
25186
|
className: "TokenAmountRow small grey"
|
|
25177
25187
|
}, /*#__PURE__*/React.createElement("span", {
|
|
25178
25188
|
className: "TokenAmountCell"
|
|
@@ -25337,13 +25347,16 @@ var Payment = /*#__PURE__*/function () {
|
|
|
25337
25347
|
case 0:
|
|
25338
25348
|
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;
|
|
25339
25349
|
requireReactVersion();
|
|
25340
|
-
|
|
25341
|
-
|
|
25350
|
+
if (currency && !SUPPORTED_CURRENCIES.includes(currency.toLowerCase())) {
|
|
25351
|
+
currency = false;
|
|
25352
|
+
}
|
|
25353
|
+
_context2.prev = 3;
|
|
25354
|
+
_context2.next = 6;
|
|
25342
25355
|
return preflight$1({
|
|
25343
25356
|
accept: accept,
|
|
25344
25357
|
recover: recover
|
|
25345
25358
|
});
|
|
25346
|
-
case
|
|
25359
|
+
case 6:
|
|
25347
25360
|
if (typeof window._depayUnmountLoading == 'function') {
|
|
25348
25361
|
window._depayUnmountLoading();
|
|
25349
25362
|
}
|
|
@@ -25410,18 +25423,18 @@ var Payment = /*#__PURE__*/function () {
|
|
|
25410
25423
|
return _context2.abrupt("return", {
|
|
25411
25424
|
unmount: unmount
|
|
25412
25425
|
});
|
|
25413
|
-
case
|
|
25414
|
-
_context2.prev =
|
|
25415
|
-
_context2.t0 = _context2["catch"](
|
|
25426
|
+
case 11:
|
|
25427
|
+
_context2.prev = 11;
|
|
25428
|
+
_context2.t0 = _context2["catch"](3);
|
|
25416
25429
|
console.log('critical error', _context2.t0);
|
|
25417
25430
|
if (critical != undefined) {
|
|
25418
25431
|
critical(_context2.t0);
|
|
25419
25432
|
}
|
|
25420
|
-
case
|
|
25433
|
+
case 15:
|
|
25421
25434
|
case "end":
|
|
25422
25435
|
return _context2.stop();
|
|
25423
25436
|
}
|
|
25424
|
-
}, _callee2, null, [[
|
|
25437
|
+
}, _callee2, null, [[3, 11]]);
|
|
25425
25438
|
}));
|
|
25426
25439
|
return function Payment(_x2) {
|
|
25427
25440
|
return _ref4.apply(this, arguments);
|