@depay/widgets 7.15.2 → 7.15.3
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 +13 -4
- package/dist/umd/index.bundle.js +2 -2
- package/dist/umd/index.js +13 -4
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -18938,7 +18938,7 @@ var ChangableAmountProvider = (function (props) {
|
|
|
18938
18938
|
maxRoute = _useState12[0],
|
|
18939
18939
|
setMaxRoute = _useState12[1];
|
|
18940
18940
|
|
|
18941
|
-
var _useState13 = useState(
|
|
18941
|
+
var _useState13 = useState(),
|
|
18942
18942
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
18943
18943
|
maxAmount = _useState14[0],
|
|
18944
18944
|
setMaxAmount = _useState14[1];
|
|
@@ -19061,6 +19061,11 @@ var ChangableAmountProvider = (function (props) {
|
|
|
19061
19061
|
toAddress: account
|
|
19062
19062
|
}).then(function (routes) {
|
|
19063
19063
|
if (routes[0] == undefined) {
|
|
19064
|
+
Token.readable({
|
|
19065
|
+
amount: maxRoute.fromBalance,
|
|
19066
|
+
blockchain: maxRoute.blockchain,
|
|
19067
|
+
address: maxRoute.toToken.address
|
|
19068
|
+
}).then(setMaxAmount);
|
|
19064
19069
|
return;
|
|
19065
19070
|
}
|
|
19066
19071
|
|
|
@@ -20377,7 +20382,11 @@ var ChangeAmountDialog = (function (props) {
|
|
|
20377
20382
|
|
|
20378
20383
|
var toValidValue = function toValidValue(value) {
|
|
20379
20384
|
value = toValidStep(value);
|
|
20380
|
-
|
|
20385
|
+
|
|
20386
|
+
if (maxAmount) {
|
|
20387
|
+
value = Math.max(min, Math.min(value, maxAmount));
|
|
20388
|
+
}
|
|
20389
|
+
|
|
20381
20390
|
value = toValidStep(value);
|
|
20382
20391
|
return value;
|
|
20383
20392
|
};
|
|
@@ -20404,7 +20413,7 @@ var ChangeAmountDialog = (function (props) {
|
|
|
20404
20413
|
}, /*#__PURE__*/React.createElement("div", {
|
|
20405
20414
|
className: "PaddingBottomM"
|
|
20406
20415
|
}, /*#__PURE__*/React.createElement("input", {
|
|
20407
|
-
max: parseFloat(maxAmount),
|
|
20416
|
+
max: maxAmount ? parseFloat(maxAmount) : null,
|
|
20408
20417
|
min: min,
|
|
20409
20418
|
step: step,
|
|
20410
20419
|
className: "Input FontSizeXXL TextAlignCenter",
|
|
@@ -20417,7 +20426,7 @@ var ChangeAmountDialog = (function (props) {
|
|
|
20417
20426
|
onBlur: function onBlur(event) {
|
|
20418
20427
|
setValidValue(event.target.value);
|
|
20419
20428
|
}
|
|
20420
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
20429
|
+
})), maxAmount && /*#__PURE__*/React.createElement("div", {
|
|
20421
20430
|
style: {
|
|
20422
20431
|
height: '40px'
|
|
20423
20432
|
}
|