@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/umd/index.js
CHANGED
|
@@ -23647,11 +23647,18 @@
|
|
|
23647
23647
|
var approvalButton = function approvalButton() {
|
|
23648
23648
|
if (payment.route == undefined || !payment.route.approvalRequired || payment.route.directTransfer || updatedRouteWithNewPrice) {
|
|
23649
23649
|
return null;
|
|
23650
|
+
} else if (paymentValueLoss) {
|
|
23651
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
23652
|
+
className: "PaddingBottomXS"
|
|
23653
|
+
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
23654
|
+
className: "ButtonPrimary disabled",
|
|
23655
|
+
onClick: function onClick() {},
|
|
23656
|
+
title: "Allow ".concat(payment.symbol, " to be used as payment")
|
|
23657
|
+
}, "Approve use of ", payment.symbol));
|
|
23650
23658
|
} else if (paymentState == 'initialized') {
|
|
23651
23659
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
23652
23660
|
className: "PaddingBottomXS"
|
|
23653
23661
|
}, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
23654
|
-
disabled: paymentValueLoss,
|
|
23655
23662
|
className: "ButtonPrimary",
|
|
23656
23663
|
onClick: approve,
|
|
23657
23664
|
title: "Allow ".concat(payment.symbol, " to be used as payment")
|
|
@@ -23681,11 +23688,7 @@
|
|
|
23681
23688
|
}
|
|
23682
23689
|
}, "Reload"));
|
|
23683
23690
|
} else if (paymentValueLoss) {
|
|
23684
|
-
return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement("
|
|
23685
|
-
className: "PaddingBottomXS"
|
|
23686
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
23687
|
-
className: "Alert"
|
|
23688
|
-
}, /*#__PURE__*/React__default["default"].createElement("strong", null, "Payment would lose ", paymentValueLoss, "% of its value!"))), /*#__PURE__*/React__default["default"].createElement("button", {
|
|
23691
|
+
return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement("button", {
|
|
23689
23692
|
className: "ButtonPrimary disabled",
|
|
23690
23693
|
onClick: function onClick() {}
|
|
23691
23694
|
}, "Pay"));
|
|
@@ -23741,7 +23744,11 @@
|
|
|
23741
23744
|
}
|
|
23742
23745
|
}
|
|
23743
23746
|
};
|
|
23744
|
-
return /*#__PURE__*/React__default["default"].createElement("div", null,
|
|
23747
|
+
return /*#__PURE__*/React__default["default"].createElement("div", null, paymentValueLoss && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
23748
|
+
className: "PaddingBottomXS"
|
|
23749
|
+
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
23750
|
+
className: "Alert"
|
|
23751
|
+
}, /*#__PURE__*/React__default["default"].createElement("strong", null, "Payment would lose ", paymentValueLoss, "% of its value!"))), approvalButton(), additionalPaymentInformation(), mainAction());
|
|
23745
23752
|
});
|
|
23746
23753
|
|
|
23747
23754
|
var DonationOverviewDialog = (function (props) {
|
|
@@ -24979,6 +24986,8 @@
|
|
|
24979
24986
|
}());
|
|
24980
24987
|
};
|
|
24981
24988
|
|
|
24989
|
+
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"];
|
|
24990
|
+
|
|
24982
24991
|
var PaymentAmountRoutingContext = /*#__PURE__*/React__default["default"].createContext();
|
|
24983
24992
|
|
|
24984
24993
|
var PaymentAmountRoutingProvider = (function (props) {
|
|
@@ -25054,7 +25063,8 @@
|
|
|
25054
25063
|
var _useContext = React.useContext(ConfigurationContext),
|
|
25055
25064
|
currencyCode = _useContext.currencyCode,
|
|
25056
25065
|
recover = _useContext.recover,
|
|
25057
|
-
amountConfiguration = _useContext.amount
|
|
25066
|
+
amountConfiguration = _useContext.amount,
|
|
25067
|
+
currency = _useContext.currency;
|
|
25058
25068
|
var _useContext2 = React.useContext(PaymentContext),
|
|
25059
25069
|
payment = _useContext2.payment,
|
|
25060
25070
|
paymentState = _useContext2.paymentState;
|
|
@@ -25168,7 +25178,7 @@
|
|
|
25168
25178
|
className: "TokenSymbolCell"
|
|
25169
25179
|
}, payment.symbol), /*#__PURE__*/React__default["default"].createElement("span", null, "\xA0"), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
25170
25180
|
className: "TokenAmountCell"
|
|
25171
|
-
}, format(payment.amount))), displayedPaymentValue != "".concat(payment.symbol, " ").concat(format(payment.amount)) && !(amountsMissing && !fixedCurrency) && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
25181
|
+
}, format(payment.amount))), displayedPaymentValue != "".concat(payment.symbol, " ").concat(format(payment.amount)) && !(amountsMissing && !fixedCurrency) && currency !== false && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
25172
25182
|
className: "TokenAmountRow small grey"
|
|
25173
25183
|
}, /*#__PURE__*/React__default["default"].createElement("span", {
|
|
25174
25184
|
className: "TokenAmountCell"
|
|
@@ -25333,13 +25343,16 @@
|
|
|
25333
25343
|
case 0:
|
|
25334
25344
|
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
25345
|
requireReactVersion();
|
|
25336
|
-
|
|
25337
|
-
|
|
25346
|
+
if (currency && !SUPPORTED_CURRENCIES.includes(currency.toLowerCase())) {
|
|
25347
|
+
currency = false;
|
|
25348
|
+
}
|
|
25349
|
+
_context2.prev = 3;
|
|
25350
|
+
_context2.next = 6;
|
|
25338
25351
|
return preflight$1({
|
|
25339
25352
|
accept: accept,
|
|
25340
25353
|
recover: recover
|
|
25341
25354
|
});
|
|
25342
|
-
case
|
|
25355
|
+
case 6:
|
|
25343
25356
|
if (typeof window._depayUnmountLoading == 'function') {
|
|
25344
25357
|
window._depayUnmountLoading();
|
|
25345
25358
|
}
|
|
@@ -25406,18 +25419,18 @@
|
|
|
25406
25419
|
return _context2.abrupt("return", {
|
|
25407
25420
|
unmount: unmount
|
|
25408
25421
|
});
|
|
25409
|
-
case
|
|
25410
|
-
_context2.prev =
|
|
25411
|
-
_context2.t0 = _context2["catch"](
|
|
25422
|
+
case 11:
|
|
25423
|
+
_context2.prev = 11;
|
|
25424
|
+
_context2.t0 = _context2["catch"](3);
|
|
25412
25425
|
console.log('critical error', _context2.t0);
|
|
25413
25426
|
if (critical != undefined) {
|
|
25414
25427
|
critical(_context2.t0);
|
|
25415
25428
|
}
|
|
25416
|
-
case
|
|
25429
|
+
case 15:
|
|
25417
25430
|
case "end":
|
|
25418
25431
|
return _context2.stop();
|
|
25419
25432
|
}
|
|
25420
|
-
}, _callee2, null, [[
|
|
25433
|
+
}, _callee2, null, [[3, 11]]);
|
|
25421
25434
|
}));
|
|
25422
25435
|
return function Payment(_x2) {
|
|
25423
25436
|
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.14",
|
|
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",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@depay/web3-exchanges": "^11.6.1",
|
|
49
49
|
"@depay/web3-payments": "^11.1.0",
|
|
50
50
|
"@depay/web3-tokens": "^9.16.0",
|
|
51
|
-
"@depay/web3-wallets": "^15.4.
|
|
51
|
+
"@depay/web3-wallets": "^15.4.6",
|
|
52
52
|
"@tanstack/react-virtual": "^3.0.0-beta.45",
|
|
53
53
|
"@uiw/copy-to-clipboard": "^1.0.12",
|
|
54
54
|
"decimal.js": "^10.3.1",
|