@depay/widgets 6.12.1 → 6.13.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/README.md CHANGED
@@ -586,6 +586,29 @@ let { unmount } = await DePayWidgets.Payment({})
586
586
  unmount()
587
587
  ```
588
588
 
589
+ #### recover
590
+
591
+ `recover`
592
+
593
+ Allows you to recover a previous made payment. E.g. useful if you need to continue to show a pending payment progress if user rearrives or reloads a payment page:
594
+
595
+ ```javascript
596
+ DePayWidgets.Payment({
597
+ recover: {
598
+ blockchain: 'ethereum',
599
+ transaction: '0x081ae81229b2c7df586835e9e4c16aa89f8a15dc118fac31b7521477c53ed2a9',
600
+ sender: '0x317d875ca3b9f8d14f960486c0d1d1913be74e90',
601
+ nonce: 2865,
602
+ afterBlock: 14088130,
603
+ token: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',
604
+ amount: 0.0001
605
+ }
606
+ })
607
+
608
+ A recovered payment still results in a confirmed or failed payment, and also calls one of those callbacks also when created with recover.
609
+
610
+ ```
611
+
589
612
  ## DePay Sales
590
613
 
591
614
  DePay Sales allows you to sell tokens directly from your website or dApp with automatic any-to-any payment conversion (so people can use any token when buying your token directly off your website or dApp).
@@ -49484,7 +49484,7 @@ var CardStyle = (function (style) {
49484
49484
  });
49485
49485
 
49486
49486
  var DialogStyle = (function (style) {
49487
- return "\n\n .ReactDialogBackground {\n backdrop-filter: blur(5px);\n background: rgba(0,0,0,0.7);\n }\n\n .Dialog {\n margin: 0 auto;\n position: relative;\n width: 420px;\n box-shadow: 0 0 20px rgba(0,0,0,0.1);\n border-radius: 0.8rem;\n background: rgb(248,248,248);\n }\n\n @media screen and (max-width: 450px) {\n \n .Dialog, .ReactDialogAnimation {\n width: 100%;\n }\n\n }\n\n @media (orientation: portrait) and (max-width: 900px) {\n\n .Dialog {\n align-content: stretch;\n display: flex;\n flex-direction: column;\n height: 100%;\n }\n\n .DialogBody {\n flex: 1;\n align-items: flex-end;\n }\n\n .DialogFooter {\n padding-bottom: 20px;\n }\n\n .ReactDialogStackCell {\n vertical-align: bottom;\n }\n\n .ReactDialogAnimation {\n bottom: -100px !important;\n top: inherit !important;\n transition: opacity 0.4s ease, bottom 0.4s ease;\n }\n\n .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n bottom: 0px !important;\n }\n\n .DialogFooter {\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n }\n\n .DialogBody {\n background: rgb(248,248,248);\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n .DialogBody.ScrollHeight {\n height: 30vh !important;\n max-height: 30vh !important;\n }\n\n .DialogHeader {\n background: rgb(248,248,248);\n border-top-left-radius: 0.8rem;\n border-top-right-radius: 0.8rem;\n min-height: 3.4rem;\n position: relative;\n width: 100%;\n }\n\n .DialogHeaderActionRight {\n position: absolute;\n top: 0;\n right: 0;\n height: 3rem;\n }\n\n .DialogHeaderActionLeft {\n position: absolute;\n top: 0;\n left: 0;\n height: 3rem;\n }\n\n .DialogFooter {\n background: rgb(248,248,248);\n border-bottom-left-radius: 0.8rem;\n border-bottom-right-radius: 0.8rem;\n line-height: 1.5rem;\n min-height: 2rem;\n position: relative;\n text-align: center;\n }\n\n .ReactShadowDOMInsideContainer > .ReactDialog {\n display: table;\n }\n\n ";
49487
+ return "\n\n .ReactDialogBackground {\n backdrop-filter: blur(5px);\n background: rgba(0,0,0,0.7);\n }\n\n .Dialog {\n margin: 0 auto;\n position: relative;\n width: 420px;\n box-shadow: 0 0 20px rgba(0,0,0,0.1);\n border-radius: 0.8rem;\n background: rgb(248,248,248);\n }\n\n @media screen and (max-width: 450px) {\n \n .Dialog, .ReactDialogAnimation {\n width: 100%;\n }\n\n }\n\n @media (orientation: portrait) and (max-width: 900px) {\n\n .Dialog {\n align-content: stretch;\n display: flex;\n flex-direction: column;\n }\n\n .ReactDialogCell {\n vertical-align: bottom;\n }\n\n .DialogBody {\n flex: 1;\n align-items: flex-end;\n }\n\n .DialogFooter {\n padding-bottom: 20px;\n }\n\n .ReactDialogStackCell {\n vertical-align: bottom;\n }\n\n .ReactDialogAnimation {\n bottom: -100px !important;\n top: inherit !important;\n transition: opacity 0.4s ease, bottom 0.4s ease;\n }\n\n .ReactDialog.ReactDialogOpen .ReactDialogAnimation {\n bottom: 0px !important;\n }\n\n .DialogFooter {\n border-bottom-left-radius: 0 !important;\n border-bottom-right-radius: 0 !important;\n }\n }\n\n .DialogBody {\n background: rgb(248,248,248);\n overflow-x: hidden;\n overflow-y: auto;\n }\n\n .DialogBody.ScrollHeight {\n height: 30vh !important;\n max-height: 30vh !important;\n }\n\n .DialogHeader {\n background: rgb(248,248,248);\n border-top-left-radius: 0.8rem;\n border-top-right-radius: 0.8rem;\n min-height: 3.4rem;\n position: relative;\n width: 100%;\n }\n\n .DialogHeaderActionRight {\n position: absolute;\n top: 0;\n right: 0;\n height: 3rem;\n }\n\n .DialogHeaderActionLeft {\n position: absolute;\n top: 0;\n left: 0;\n height: 3rem;\n }\n\n .DialogFooter {\n background: rgb(248,248,248);\n border-bottom-left-radius: 0.8rem;\n border-bottom-right-radius: 0.8rem;\n line-height: 1.5rem;\n min-height: 2rem;\n position: relative;\n text-align: center;\n }\n\n .ReactShadowDOMInsideContainer > .ReactDialog {\n display: table;\n }\n\n ";
49488
49488
  });
49489
49489
 
49490
49490
  var FontStyle = (function (style) {
@@ -61722,16 +61722,17 @@ var ChangableAmountProvider = (function (props) {
61722
61722
  });
61723
61723
  };
61724
61724
 
61725
- var _useState = react.useState(configurationsMissAmounts(props.accept)),
61725
+ var _useContext = react.useContext(ConfigurationContext),
61726
+ amountConfiguration = _useContext.amount,
61727
+ recover = _useContext.recover;
61728
+
61729
+ var _useState = react.useState(recover == undefined ? configurationsMissAmounts(props.accept) : false),
61726
61730
  _useState2 = _slicedToArray(_useState, 2),
61727
61731
  amountsMissing = _useState2[0],
61728
61732
  setAmountsMissing = _useState2[1];
61729
61733
 
61730
- var _useContext = react.useContext(WalletContext),
61731
- account = _useContext.account;
61732
-
61733
- var _useContext2 = react.useContext(ConfigurationContext),
61734
- amountConfiguration = _useContext2.amount;
61734
+ var _useContext2 = react.useContext(WalletContext),
61735
+ account = _useContext2.account;
61735
61736
 
61736
61737
  var _useContext3 = react.useContext(ConversionRateContext),
61737
61738
  conversionRate = _useContext3.conversionRate;
@@ -61760,8 +61761,12 @@ var ChangableAmountProvider = (function (props) {
61760
61761
  setMaxAmount = _useState10[1];
61761
61762
 
61762
61763
  react.useEffect(function () {
61764
+ if (recover) {
61765
+ return;
61766
+ }
61767
+
61763
61768
  setAmountsMissing(configurationsMissAmounts(props.accept));
61764
- }, [props.accept]);
61769
+ }, [props.accept, recover]);
61765
61770
 
61766
61771
  var getAmounts = function getAmounts() {
61767
61772
  return new Promise(function (resolve, reject) {
@@ -61797,6 +61802,10 @@ var ChangableAmountProvider = (function (props) {
61797
61802
  };
61798
61803
 
61799
61804
  react.useEffect(function () {
61805
+ if (recover) {
61806
+ return;
61807
+ }
61808
+
61800
61809
  if (amountsMissing && account && conversionRate) {
61801
61810
  getAmounts().then(function (amounts) {
61802
61811
  setAcceptWithAmount(props.accept.map(function (configuration, index) {
@@ -61815,7 +61824,7 @@ var ChangableAmountProvider = (function (props) {
61815
61824
  }));
61816
61825
  })["catch"](setError);
61817
61826
  }
61818
- }, [amountsMissing, account, conversionRate, amount]);
61827
+ }, [amountsMissing, account, conversionRate, amount, recover]);
61819
61828
  react.useEffect(function () {
61820
61829
  if (amountsMissing && maxRoute) {
61821
61830
  maxRoute.fromToken.readable(maxRoute.fromBalance).then(function (readableMaxAmount) {
@@ -62434,10 +62443,12 @@ var PaymentProvider = (function (props) {
62434
62443
  var _useContext2 = react.useContext(ConfigurationContext),
62435
62444
  _sent = _useContext2.sent,
62436
62445
  confirmed = _useContext2.confirmed,
62437
- failed = _useContext2.failed;
62446
+ failed = _useContext2.failed,
62447
+ recover = _useContext2.recover;
62438
62448
 
62439
62449
  var _useContext3 = react.useContext(PaymentRoutingContext),
62440
- selectedRoute = _useContext3.selectedRoute;
62450
+ selectedRoute = _useContext3.selectedRoute,
62451
+ getPaymentRoutes = _useContext3.getPaymentRoutes;
62441
62452
 
62442
62453
  var _useContext4 = react.useContext(ClosableContext),
62443
62454
  open = _useContext4.open,
@@ -62503,8 +62514,10 @@ var PaymentProvider = (function (props) {
62503
62514
  }
62504
62515
 
62505
62516
  setPaymentState('initialized');
62517
+ setPayment(null);
62506
62518
  setClosable(true);
62507
62519
  setUpdatable(true);
62520
+ getPaymentRoutes({});
62508
62521
  navigate('PaymentError');
62509
62522
  };
62510
62523
 
@@ -62590,6 +62603,39 @@ var PaymentProvider = (function (props) {
62590
62603
  setPaymentState('confirmed');
62591
62604
  }
62592
62605
  }, [release]);
62606
+ react.useEffect(function () {
62607
+ if (recover) {
62608
+ setClosable(false);
62609
+ setUpdatable(false);
62610
+ setPaymentState('paying');
62611
+ setTransaction({
62612
+ blockchain: recover.blockchain,
62613
+ id: recover.transaction,
62614
+ url: Blockchain.findByName(recover.blockchain).explorerUrlFor({
62615
+ transaction: {
62616
+ id: recover.transaction
62617
+ }
62618
+ })
62619
+ });
62620
+ var paymentToken = new Token({
62621
+ blockchain: recover.blockchain,
62622
+ address: recover.token
62623
+ });
62624
+ Promise.all([paymentToken.name(), paymentToken.symbol()]).then(function (_ref2) {
62625
+ var _ref3 = _slicedToArray(_ref2, 2),
62626
+ name = _ref3[0],
62627
+ symbol = _ref3[1];
62628
+
62629
+ setPayment({
62630
+ blockchain: recover.blockchain,
62631
+ token: recover.token,
62632
+ name: name,
62633
+ symbol: symbol.toUpperCase(),
62634
+ amount: recover.amount
62635
+ });
62636
+ })["catch"](setError);
62637
+ }
62638
+ }, [recover]);
62593
62639
  react.useEffect(function () {
62594
62640
  if (foundTransaction && foundTransaction.id && foundTransaction.status) {
62595
62641
  var newTransaction;
@@ -62614,16 +62660,16 @@ var PaymentProvider = (function (props) {
62614
62660
  react.useEffect(function () {
62615
62661
  if (selectedRoute) {
62616
62662
  var fromToken = selectedRoute.fromToken;
62617
- selectedRoute.transaction.params;
62618
- Promise.all([fromToken.name(), fromToken.symbol(), fromToken.readable(selectedRoute.fromAmount)]).then(function (_ref2) {
62619
- var _ref3 = _slicedToArray(_ref2, 3),
62620
- name = _ref3[0],
62621
- symbol = _ref3[1],
62622
- amount = _ref3[2];
62663
+ Promise.all([fromToken.name(), fromToken.symbol(), fromToken.readable(selectedRoute.fromAmount)]).then(function (_ref4) {
62664
+ var _ref5 = _slicedToArray(_ref4, 3),
62665
+ name = _ref5[0],
62666
+ symbol = _ref5[1],
62667
+ amount = _ref5[2];
62623
62668
 
62624
62669
  setPayment({
62670
+ blockchain: selectedRoute.blockchain,
62625
62671
  route: selectedRoute,
62626
- token: selectedRoute.fromToken.address,
62672
+ token: fromToken.address,
62627
62673
  name: name,
62628
62674
  symbol: symbol.toUpperCase(),
62629
62675
  amount: amount
@@ -67964,6 +68010,9 @@ var PaymentRoutingProvider = (function (props) {
67964
68010
  var _useContext2 = react.useContext(UpdatableContext),
67965
68011
  updatable = _useContext2.updatable;
67966
68012
 
68013
+ var _useContext3 = react.useContext(ConfigurationContext),
68014
+ recover = _useContext3.recover;
68015
+
67967
68016
  var prepareAcceptedPayments = function prepareAcceptedPayments(accept) {
67968
68017
  var toAddress = _typeof(accept.receiver) == 'object' ? accept.receiver.address : accept.receiver;
67969
68018
  var toContract = _typeof(accept.receiver) == 'object' ? accept.receiver : undefined;
@@ -68091,7 +68140,7 @@ var PaymentRoutingProvider = (function (props) {
68091
68140
  };
68092
68141
  }, [reloadCount, allRoutes, selectedRoute, updatable]);
68093
68142
  react.useEffect(function () {
68094
- if (account && props.accept) {
68143
+ if (account && props.accept && recover == undefined) {
68095
68144
  setAllRoutes(undefined);
68096
68145
  setSelectedRoute(undefined);
68097
68146
  getPaymentRoutes({});
@@ -68104,6 +68153,7 @@ var PaymentRoutingProvider = (function (props) {
68104
68153
  value: {
68105
68154
  selectedRoute: selectedRoute,
68106
68155
  setSelectedRoute: setSelectedRoute,
68156
+ getPaymentRoutes: getPaymentRoutes,
68107
68157
  allRoutes: allRoutes,
68108
68158
  setAllRoutes: setAllRoutes
68109
68159
  }
@@ -70460,7 +70510,7 @@ var Footer = (function () {
70460
70510
  };
70461
70511
 
70462
70512
  var approvalButton = function approvalButton() {
70463
- if (!payment.route.approvalRequired || payment.route.directTransfer) {
70513
+ if (payment.route == undefined || !payment.route.approvalRequired || payment.route.directTransfer) {
70464
70514
  return null;
70465
70515
  } else if (paymentState == 'initialized') {
70466
70516
  return /*#__PURE__*/react.createElement("div", {
@@ -70497,7 +70547,7 @@ var Footer = (function () {
70497
70547
  displayedAmount = "".concat(payment.symbol, " ").concat(payment.amount);
70498
70548
  }
70499
70549
 
70500
- if (paymentState == 'initialized' || paymentState == 'approving') {
70550
+ if ((paymentState == 'initialized' || paymentState == 'approving') && payment.route) {
70501
70551
  return /*#__PURE__*/react.createElement("button", {
70502
70552
  className: ["ButtonPrimary", payment.route.approvalRequired && !payment.route.directTransfer ? 'disabled' : ''].join(' '),
70503
70553
  onClick: function onClick() {
@@ -70646,8 +70696,11 @@ var PaymentErrorDialog = (function () {
70646
70696
  var _useContext2 = react.useContext(PaymentContext),
70647
70697
  transaction = _useContext2.transaction;
70648
70698
 
70699
+ var _useContext3 = react.useContext(ConfigurationContext),
70700
+ recover = _useContext3.recover;
70701
+
70649
70702
  return /*#__PURE__*/react.createElement(Dialog, {
70650
- stacked: true,
70703
+ stacked: recover ? false : true,
70651
70704
  header: /*#__PURE__*/react.createElement("div", {
70652
70705
  className: "PaddingTopS PaddingLeftM PaddingRightM"
70653
70706
  }),
@@ -70660,7 +70713,7 @@ var PaymentErrorDialog = (function () {
70660
70713
  className: "LineHeightL Text FontSizeL PaddingTopS FontWeightBold"
70661
70714
  }, "Payment Failed"), /*#__PURE__*/react.createElement("div", {
70662
70715
  className: "Text PaddingTopS PaddingBottomS PaddingLeftS PaddingRightS"
70663
- }, /*#__PURE__*/react.createElement("strong", {
70716
+ }, recover == undefined && /*#__PURE__*/react.createElement("strong", {
70664
70717
  className: "FontSizeM"
70665
70718
  }, "Unfortunately executing your payment failed. You can go back and try again."), transaction && /*#__PURE__*/react.createElement("div", {
70666
70719
  className: "PaddingTopS"
@@ -70673,7 +70726,7 @@ var PaymentErrorDialog = (function () {
70673
70726
  }, "View on explorer")))),
70674
70727
  footer: /*#__PURE__*/react.createElement("div", {
70675
70728
  className: "PaddingTopXS PaddingRightM PaddingLeftM PaddingBottomM"
70676
- }, /*#__PURE__*/react.createElement("button", {
70729
+ }, recover == undefined && /*#__PURE__*/react.createElement("button", {
70677
70730
  className: "ButtonPrimary",
70678
70731
  onClick: function onClick() {
70679
70732
  return navigate('back');
@@ -71011,9 +71064,12 @@ var TransactionTrackingProvider = (function (props) {
71011
71064
  var _useContext = react.useContext(ErrorContext);
71012
71065
  _useContext.errorCallback;
71013
71066
 
71067
+ var _useContext2 = react.useContext(ConfigurationContext),
71068
+ recover = _useContext2.recover;
71069
+
71014
71070
  react.useEffect(function () {
71015
71071
  if (polling) {
71016
- var pollingInterval = setInterval(function () {
71072
+ var poll = function poll() {
71017
71073
  fetch("https://api.depay.fi/v2/transactions/".concat(givenTransaction.blockchain, "/").concat(givenTransaction.from.toLowerCase(), "/").concat(givenTransaction.nonce)).then(function (response) {
71018
71074
  if (response.status == 200) {
71019
71075
  response.json().then(function (data) {
@@ -71027,7 +71083,10 @@ var TransactionTrackingProvider = (function (props) {
71027
71083
  });
71028
71084
  }
71029
71085
  });
71030
- }, 5000);
71086
+ };
71087
+
71088
+ var pollingInterval = setInterval(poll, 5000);
71089
+ poll();
71031
71090
  return function () {
71032
71091
  clearInterval(pollingInterval);
71033
71092
  };
@@ -71107,11 +71166,25 @@ var TransactionTrackingProvider = (function (props) {
71107
71166
 
71108
71167
  var initializeTracking = function initializeTracking(transaction, afterBlock) {
71109
71168
  setGivenTransaction(transaction);
71110
- createTracking(transaction, afterBlock, 1);
71169
+
71170
+ if (recover == undefined) {
71171
+ createTracking(transaction, afterBlock, 1);
71172
+ }
71173
+
71111
71174
  openSocket(transaction);
71112
71175
  setPolling(true);
71113
71176
  };
71114
71177
 
71178
+ react.useEffect(function () {
71179
+ if (recover) {
71180
+ initializeTracking({
71181
+ blockchain: recover.blockchain,
71182
+ id: recover.transaction,
71183
+ from: recover.sender,
71184
+ nonce: recover.nonce
71185
+ }, recover.afterBlock);
71186
+ }
71187
+ }, [recover]);
71115
71188
  return /*#__PURE__*/react.createElement(TransactionTrackingContext.Provider, {
71116
71189
  value: {
71117
71190
  initializeTracking: initializeTracking,
@@ -71539,7 +71612,8 @@ var PaymentOverviewSkeleton = (function (props) {
71539
71612
 
71540
71613
  var PaymentOverviewDialog = (function (props) {
71541
71614
  var _useContext = react.useContext(ConfigurationContext),
71542
- currencyCode = _useContext.currencyCode;
71615
+ currencyCode = _useContext.currencyCode,
71616
+ recover = _useContext.recover;
71543
71617
 
71544
71618
  var _useContext2 = react.useContext(PaymentContext),
71545
71619
  payment = _useContext2.payment,
@@ -71555,7 +71629,7 @@ var PaymentOverviewDialog = (function (props) {
71555
71629
  var _useContext5 = react.useContext(NavigateStackContext),
71556
71630
  navigate = _useContext5.navigate;
71557
71631
 
71558
- if (payment == undefined || paymentValue == undefined) {
71632
+ if (payment == undefined || recover == undefined && paymentValue == undefined) {
71559
71633
  return /*#__PURE__*/react.createElement(PaymentOverviewSkeleton, null);
71560
71634
  }
71561
71635
 
@@ -71606,7 +71680,7 @@ var PaymentOverviewDialog = (function (props) {
71606
71680
  className: "CardImage",
71607
71681
  title: payment.name
71608
71682
  }, /*#__PURE__*/react.createElement(TokenImage, {
71609
- blockchain: payment.route.blockchain,
71683
+ blockchain: payment.blockchain,
71610
71684
  address: payment.token
71611
71685
  })), /*#__PURE__*/react.createElement("div", {
71612
71686
  className: "CardBody"
@@ -71658,12 +71732,21 @@ var PaymentStack = (function (props) {
71658
71732
 
71659
71733
  var preflight$1 = /*#__PURE__*/function () {
71660
71734
  var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(_ref) {
71661
- var accept;
71735
+ var accept, recover;
71662
71736
  return regenerator.wrap(function _callee$(_context) {
71663
71737
  while (1) {
71664
71738
  switch (_context.prev = _context.next) {
71665
71739
  case 0:
71666
- accept = _ref.accept;
71740
+ accept = _ref.accept, recover = _ref.recover;
71741
+
71742
+ if (!recover) {
71743
+ _context.next = 3;
71744
+ break;
71745
+ }
71746
+
71747
+ return _context.abrupt("return");
71748
+
71749
+ case 3:
71667
71750
  accept.forEach(function (configuration) {
71668
71751
  if (typeof configuration.blockchain === 'undefined') {
71669
71752
  throw 'You need to set the blockchain your want to receive the payment on!';
@@ -71682,7 +71765,7 @@ var preflight$1 = /*#__PURE__*/function () {
71682
71765
  }
71683
71766
  });
71684
71767
 
71685
- case 2:
71768
+ case 4:
71686
71769
  case "end":
71687
71770
  return _context.stop();
71688
71771
  }
@@ -71697,16 +71780,17 @@ var preflight$1 = /*#__PURE__*/function () {
71697
71780
 
71698
71781
  var Payment = /*#__PURE__*/function () {
71699
71782
  var _ref4 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(_ref3) {
71700
- var accept, amount, event, sent, confirmed, failed, error, critical, style, whitelist, blacklist, providers, currency, connected, closed, track, fee, document, unmount;
71783
+ var accept, amount, event, sent, confirmed, failed, error, critical, style, whitelist, blacklist, providers, currency, connected, closed, track, fee, recover, document, unmount;
71701
71784
  return regenerator.wrap(function _callee2$(_context2) {
71702
71785
  while (1) {
71703
71786
  switch (_context2.prev = _context2.next) {
71704
71787
  case 0:
71705
- accept = _ref3.accept, amount = _ref3.amount, event = _ref3.event, sent = _ref3.sent, confirmed = _ref3.confirmed, 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, document = _ref3.document;
71788
+ accept = _ref3.accept, amount = _ref3.amount, event = _ref3.event, sent = _ref3.sent, confirmed = _ref3.confirmed, 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, document = _ref3.document;
71706
71789
  _context2.prev = 1;
71707
71790
  _context2.next = 4;
71708
71791
  return preflight$1({
71709
- accept: accept
71792
+ accept: accept,
71793
+ recover: recover
71710
71794
  });
71711
71795
 
71712
71796
  case 4:
@@ -71733,7 +71817,8 @@ var Payment = /*#__PURE__*/function () {
71733
71817
  blacklist: blacklist,
71734
71818
  providers: providers,
71735
71819
  track: track,
71736
- fee: fee
71820
+ fee: fee,
71821
+ recover: recover
71737
71822
  }
71738
71823
  }, /*#__PURE__*/react.createElement(UpdatableProvider, null, /*#__PURE__*/react.createElement(ClosableProvider, {
71739
71824
  unmount: unmount