@depay/widgets 7.13.2 → 7.14.0
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 +3 -3
- package/dist/esm/index.js +18 -11
- package/dist/umd/index.bundle.js +3 -3
- package/dist/umd/index.js +18 -11
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -19064,13 +19064,13 @@ var ChangableAmountProvider = (function (props) {
|
|
|
19064
19064
|
}).then(function (readableMaxAmount) {
|
|
19065
19065
|
var slippage = 1.01;
|
|
19066
19066
|
var maxAmount = parseFloat(new Decimal(readableMaxAmount).div(slippage).mul(conversionRate).toString());
|
|
19067
|
-
setMaxAmount(maxAmount > 10 ? Math.round(maxAmount) : round(maxAmount));
|
|
19067
|
+
setMaxAmount(maxAmount > 10 ? Math.round(maxAmount - 1) : round(maxAmount - 1));
|
|
19068
19068
|
})["catch"](setError);
|
|
19069
19069
|
})["catch"](setError);
|
|
19070
19070
|
} else if (maxRoute.fromToken.address == CONSTANTS[maxRoute.blockchain].USD) {
|
|
19071
19071
|
var _maxAmount = parseFloat(new Decimal(readableMaxAmount).mul(conversionRate).toString());
|
|
19072
19072
|
|
|
19073
|
-
setMaxAmount(_maxAmount > 10 ? Math.round(_maxAmount) : _maxAmount);
|
|
19073
|
+
setMaxAmount(_maxAmount > 10 ? Math.round(_maxAmount - 1) : _maxAmount - 1);
|
|
19074
19074
|
} else {
|
|
19075
19075
|
route({
|
|
19076
19076
|
blockchain: maxRoute.blockchain,
|
|
@@ -20362,7 +20362,9 @@ var ChangeAmountDialog = (function (props) {
|
|
|
20362
20362
|
className: "PaddingLeftM PaddingRightM"
|
|
20363
20363
|
}, /*#__PURE__*/React.createElement("div", {
|
|
20364
20364
|
className: "PaddingTopS TextCenter PaddingBottomL"
|
|
20365
|
-
}, /*#__PURE__*/React.createElement("div",
|
|
20365
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
20366
|
+
className: "PaddingBottomM"
|
|
20367
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
20366
20368
|
max: parseFloat(maxAmount),
|
|
20367
20369
|
min: min,
|
|
20368
20370
|
step: step,
|
|
@@ -20382,12 +20384,12 @@ var ChangeAmountDialog = (function (props) {
|
|
|
20382
20384
|
}
|
|
20383
20385
|
}, /*#__PURE__*/React.createElement("div", {
|
|
20384
20386
|
className: "FontSizeS"
|
|
20385
|
-
}, format(toValidStep(maxAmount)), /*#__PURE__*/React.createElement("button", {
|
|
20387
|
+
}, format(toValidStep(maxAmount)), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("button", {
|
|
20386
20388
|
className: "TextButton",
|
|
20387
20389
|
onClick: function onClick() {
|
|
20388
20390
|
changeAmount(toValidValue(maxAmount));
|
|
20389
20391
|
}
|
|
20390
|
-
}, "(Max)")))))),
|
|
20392
|
+
}, "(Max)"))))))),
|
|
20391
20393
|
footer: /*#__PURE__*/React.createElement("div", {
|
|
20392
20394
|
className: "PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"
|
|
20393
20395
|
}, /*#__PURE__*/React.createElement("button", {
|
|
@@ -20537,12 +20539,15 @@ var ChangePaymentDialog = (function (props) {
|
|
|
20537
20539
|
});
|
|
20538
20540
|
|
|
20539
20541
|
var DonationOverviewSkeleton = (function (props) {
|
|
20542
|
+
var _useContext = useContext(ConfigurationContext),
|
|
20543
|
+
title = _useContext.title;
|
|
20544
|
+
|
|
20540
20545
|
return /*#__PURE__*/React.createElement(Dialog$1, {
|
|
20541
20546
|
header: /*#__PURE__*/React.createElement("div", {
|
|
20542
20547
|
className: "PaddingTopS PaddingLeftM PaddingRightM TextLeft"
|
|
20543
20548
|
}, /*#__PURE__*/React.createElement("h1", {
|
|
20544
20549
|
className: "LineHeightL FontSizeL"
|
|
20545
|
-
},
|
|
20550
|
+
}, title || 'Donation')),
|
|
20546
20551
|
body: /*#__PURE__*/React.createElement("div", {
|
|
20547
20552
|
className: "PaddingLeftM PaddingRightM PaddingBottomXS"
|
|
20548
20553
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -20896,7 +20901,8 @@ var Footer = (function () {
|
|
|
20896
20901
|
|
|
20897
20902
|
var DonationOverviewDialog = (function (props) {
|
|
20898
20903
|
var _useContext = useContext(ConfigurationContext),
|
|
20899
|
-
currencyCode = _useContext.currencyCode
|
|
20904
|
+
currencyCode = _useContext.currencyCode,
|
|
20905
|
+
title = _useContext.title;
|
|
20900
20906
|
|
|
20901
20907
|
var _useContext2 = useContext(ChangableAmountContext),
|
|
20902
20908
|
amount = _useContext2.amount;
|
|
@@ -20918,7 +20924,7 @@ var DonationOverviewDialog = (function (props) {
|
|
|
20918
20924
|
className: "PaddingTopS PaddingLeftM PaddingRightM TextLeft"
|
|
20919
20925
|
}, /*#__PURE__*/React.createElement("h1", {
|
|
20920
20926
|
className: "LineHeightL FontSizeL"
|
|
20921
|
-
},
|
|
20927
|
+
}, title || 'Donation')),
|
|
20922
20928
|
body: /*#__PURE__*/React.createElement("div", {
|
|
20923
20929
|
className: "PaddingLeftM PaddingRightM PaddingBottomXS"
|
|
20924
20930
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -21683,12 +21689,12 @@ var preflight$2 = /*#__PURE__*/function () {
|
|
|
21683
21689
|
|
|
21684
21690
|
var Donation = /*#__PURE__*/function () {
|
|
21685
21691
|
var _ref4 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(_ref3) {
|
|
21686
|
-
var amount, accept, event, sent, confirmed, validated, failed, error, critical, style, blacklist, providers, currency, connected, closed, track, fee, closable, integration, link, container, document, unmount;
|
|
21692
|
+
var amount, accept, event, sent, confirmed, validated, failed, error, critical, style, blacklist, providers, currency, connected, closed, track, fee, closable, integration, link, container, title, document, unmount;
|
|
21687
21693
|
return regenerator.wrap(function _callee2$(_context2) {
|
|
21688
21694
|
while (1) {
|
|
21689
21695
|
switch (_context2.prev = _context2.next) {
|
|
21690
21696
|
case 0:
|
|
21691
|
-
amount = _ref3.amount, accept = _ref3.accept, event = _ref3.event, sent = _ref3.sent, confirmed = _ref3.confirmed, validated = _ref3.validated, failed = _ref3.failed, error = _ref3.error, critical = _ref3.critical, style = _ref3.style, blacklist = _ref3.blacklist, providers = _ref3.providers, currency = _ref3.currency, connected = _ref3.connected, closed = _ref3.closed, track = _ref3.track, fee = _ref3.fee, closable = _ref3.closable, integration = _ref3.integration, link = _ref3.link, container = _ref3.container, document = _ref3.document;
|
|
21697
|
+
amount = _ref3.amount, accept = _ref3.accept, event = _ref3.event, sent = _ref3.sent, confirmed = _ref3.confirmed, validated = _ref3.validated, failed = _ref3.failed, error = _ref3.error, critical = _ref3.critical, style = _ref3.style, blacklist = _ref3.blacklist, providers = _ref3.providers, currency = _ref3.currency, connected = _ref3.connected, closed = _ref3.closed, track = _ref3.track, fee = _ref3.fee, closable = _ref3.closable, integration = _ref3.integration, link = _ref3.link, container = _ref3.container, title = _ref3.title, document = _ref3.document;
|
|
21692
21698
|
requireReactVersion();
|
|
21693
21699
|
_context2.prev = 2;
|
|
21694
21700
|
_context2.next = 5;
|
|
@@ -21724,7 +21730,8 @@ var Donation = /*#__PURE__*/function () {
|
|
|
21724
21730
|
blacklist: blacklist,
|
|
21725
21731
|
providers: providers,
|
|
21726
21732
|
integration: integration,
|
|
21727
|
-
link: link
|
|
21733
|
+
link: link,
|
|
21734
|
+
title: title
|
|
21728
21735
|
}
|
|
21729
21736
|
}, /*#__PURE__*/React.createElement(UpdatableProvider, null, /*#__PURE__*/React.createElement(ClosableProvider, {
|
|
21730
21737
|
unmount: unmount,
|