@depay/widgets 9.2.0 → 9.2.2

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.js CHANGED
@@ -18910,7 +18910,7 @@ var ChangableAmountProvider = (function (props) {
18910
18910
  Token.readable({
18911
18911
  amount: maxRoute.fromBalance,
18912
18912
  blockchain: maxRoute.blockchain,
18913
- address: maxRoute.toToken.address
18913
+ address: maxRoute.fromToken.address
18914
18914
  }).then(setMaxAmount);
18915
18915
  return;
18916
18916
  }
@@ -20773,6 +20773,9 @@ var PaymentTrackingProvider = (function (props) {
20773
20773
  setClosable(true);
20774
20774
  }
20775
20775
  clearInterval(pollingInterval);
20776
+ if (validated) {
20777
+ validated(true);
20778
+ }
20776
20779
  setRelease(true);
20777
20780
  }
20778
20781
  };
@@ -21530,7 +21533,8 @@ var PaymentOverviewSkeleton = (function (props) {
21530
21533
  var PaymentOverviewDialog = (function (props) {
21531
21534
  var _useContext = useContext(ConfigurationContext),
21532
21535
  currencyCode = _useContext.currencyCode,
21533
- recover = _useContext.recover;
21536
+ recover = _useContext.recover,
21537
+ amountConfiguration = _useContext.amount;
21534
21538
  var _useContext2 = useContext(PaymentContext),
21535
21539
  payment = _useContext2.payment,
21536
21540
  paymentState = _useContext2.paymentState;
@@ -21543,6 +21547,7 @@ var PaymentOverviewDialog = (function (props) {
21543
21547
  paymentValue = _useContext4.paymentValue;
21544
21548
  var _useContext5 = useContext(NavigateStackContext),
21545
21549
  navigate = _useContext5.navigate;
21550
+ var displayedCurrencyCode = amountConfiguration != undefined && amountConfiguration.token ? null : currencyCode;
21546
21551
  if (payment == undefined || recover == undefined && paymentValue == undefined) {
21547
21552
  return /*#__PURE__*/React.createElement(PaymentOverviewSkeleton, null);
21548
21553
  }
@@ -21572,12 +21577,14 @@ var PaymentOverviewDialog = (function (props) {
21572
21577
  className: "CardTitle"
21573
21578
  }, "Amount"), /*#__PURE__*/React.createElement("h2", {
21574
21579
  className: "CardText"
21575
- }, /*#__PURE__*/React.createElement("div", {
21580
+ }, displayedCurrencyCode && /*#__PURE__*/React.createElement("div", {
21576
21581
  className: "TokenAmountRow"
21577
21582
  }, new Currency({
21578
21583
  amount: amount.toFixed(2),
21579
21584
  code: currencyCode
21580
- }).toString())))), /*#__PURE__*/React.createElement("div", {
21585
+ }).toString()), !displayedCurrencyCode && /*#__PURE__*/React.createElement("div", {
21586
+ className: "TokenAmountRow"
21587
+ }, amount)))), /*#__PURE__*/React.createElement("div", {
21581
21588
  className: "CardAction"
21582
21589
  }, /*#__PURE__*/React.createElement(ChevronRight, null))), /*#__PURE__*/React.createElement("div", {
21583
21590
  className: ["Card", paymentState == 'initialized' ? '' : 'disabled'].join(' '),