@depay/widgets 12.3.15 → 12.3.16

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.
@@ -22663,7 +22663,7 @@
22663
22663
  }, {
22664
22664
  label: "Wallet missing?",
22665
22665
  action: function action() {
22666
- window.open('mailto:support@depay.com?subject=Add wallet&body=Can you please add the following wallet: [ENTER YOUR WALLET HERE]?', '_blank');
22666
+ window.open('mailto:support@depay.com?subject=Add wallet&body=Please enter the name of the wallet you want us to add:', '_blank');
22667
22667
  }
22668
22668
  }]
22669
22669
  })),
@@ -25779,6 +25779,7 @@
25779
25779
  };
25780
25780
  var pay = /*#__PURE__*/function () {
25781
25781
  var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2() {
25782
+ var _transaction$params;
25782
25783
  var transaction, stop, currentBlock;
25783
25784
  return regenerator.wrap(function _callee2$(_context2) {
25784
25785
  while (1) switch (_context2.prev = _context2.next) {
@@ -25819,24 +25820,26 @@
25819
25820
  case 18:
25820
25821
  currentBlock = _context2.sent;
25821
25822
  _context2.next = 21;
25822
- return trace(currentBlock, payment.route, transaction).then( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee() {
25823
+ return trace(currentBlock, payment.route, transaction, transaction === null || transaction === void 0 || (_transaction$params = transaction.params) === null || _transaction$params === void 0 || (_transaction$params = _transaction$params.payment) === null || _transaction$params === void 0 ? void 0 : _transaction$params.deadline).then( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee() {
25823
25824
  return regenerator.wrap(function _callee$(_context) {
25824
25825
  while (1) switch (_context.prev = _context.next) {
25825
25826
  case 0:
25826
25827
  setClosable(false);
25827
25828
  _context.next = 3;
25828
25829
  return wallet.sendTransaction(Object.assign({}, transaction, {
25829
- sent: function sent(transaction) {
25830
- initializeTransactionTracking(transaction, currentBlock);
25830
+ sent: function sent(sentTransaction) {
25831
+ var _transaction$params2;
25832
+ initializeTransactionTracking(sentTransaction, currentBlock, transaction === null || transaction === void 0 || (_transaction$params2 = transaction.params) === null || _transaction$params2 === void 0 || (_transaction$params2 = _transaction$params2.payment) === null || _transaction$params2 === void 0 ? void 0 : _transaction$params2.deadline);
25831
25833
  if (_sent) {
25832
- _sent(transaction);
25834
+ _sent(sentTransaction);
25833
25835
  }
25834
25836
  },
25835
25837
  succeeded: paymentSucceeded,
25836
25838
  failed: paymentFailed
25837
25839
  })).then(function (sentTransaction) {
25840
+ var _transaction$params3;
25838
25841
  setTransaction(sentTransaction);
25839
- initializePaymentTracking(sentTransaction, currentBlock, payment.route);
25842
+ initializePaymentTracking(sentTransaction, currentBlock, payment.route, transaction === null || transaction === void 0 || (_transaction$params3 = transaction.params) === null || _transaction$params3 === void 0 || (_transaction$params3 = _transaction$params3.payment) === null || _transaction$params3 === void 0 ? void 0 : _transaction$params3.deadline);
25840
25843
  })["catch"](function (error) {
25841
25844
  console.log('error', error);
25842
25845
  setPaymentState('initialized');
@@ -26659,7 +26662,7 @@
26659
26662
  return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement("a", {
26660
26663
  className: "Card transparent small",
26661
26664
  title: "DePay has validated the payment",
26662
- href: "https://depay.com/docs/payments/validation",
26665
+ href: "https://status.depay.com/tx/".concat(transaction.blockchain, "/").concat(transaction.id),
26663
26666
  target: "_blank",
26664
26667
  rel: "noopener noreferrer"
26665
26668
  }, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -26678,8 +26681,8 @@
26678
26681
  } else {
26679
26682
  return /*#__PURE__*/React__default["default"].createElement("div", null, /*#__PURE__*/React__default["default"].createElement("a", {
26680
26683
  className: "Card transparent small",
26681
- title: "DePay is validating payment",
26682
- href: "https://depay.com/docs/payments/validation",
26684
+ title: "DePay is validating the payment",
26685
+ href: "https://status.depay.com/tx/".concat(transaction.blockchain, "/").concat(transaction.id),
26683
26686
  target: "_blank",
26684
26687
  rel: "noopener noreferrer"
26685
26688
  }, /*#__PURE__*/React__default["default"].createElement("div", {
@@ -27341,53 +27344,59 @@
27341
27344
  wallet = _useContext3.wallet;
27342
27345
  var _useState = React.useState(),
27343
27346
  _useState2 = _slicedToArray(_useState, 2),
27344
- transaction = _useState2[0],
27345
- setTransaction = _useState2[1];
27347
+ deadline = _useState2[0],
27348
+ setDeadline = _useState2[1];
27346
27349
  var _useState3 = React.useState(),
27347
27350
  _useState4 = _slicedToArray(_useState3, 2),
27348
- confirmationsRequired = _useState4[0],
27349
- setConfirmationsRequired = _useState4[1];
27351
+ transaction = _useState4[0],
27352
+ setTransaction = _useState4[1];
27350
27353
  var _useState5 = React.useState(),
27351
27354
  _useState6 = _slicedToArray(_useState5, 2),
27352
- confirmationsPassed = _useState6[0],
27353
- setConfirmationsPassed = _useState6[1];
27355
+ confirmationsRequired = _useState6[0],
27356
+ setConfirmationsRequired = _useState6[1];
27354
27357
  var _useState7 = React.useState(),
27355
27358
  _useState8 = _slicedToArray(_useState7, 2),
27356
- afterBlock = _useState8[0],
27357
- setAfterBlock = _useState8[1];
27359
+ confirmationsPassed = _useState8[0],
27360
+ setConfirmationsPassed = _useState8[1];
27358
27361
  var _useState9 = React.useState(),
27359
- _useState10 = _slicedToArray(_useState9, 2);
27360
- _useState10[0];
27361
- _useState10[1];
27362
+ _useState10 = _slicedToArray(_useState9, 2),
27363
+ afterBlock = _useState10[0],
27364
+ setAfterBlock = _useState10[1];
27362
27365
  var _useState11 = React.useState(),
27363
- _useState12 = _slicedToArray(_useState11, 2),
27364
- paymentRoute = _useState12[0],
27365
- setPaymentRoute = _useState12[1];
27366
+ _useState12 = _slicedToArray(_useState11, 2);
27367
+ _useState12[0];
27368
+ _useState12[1];
27366
27369
  var _useState13 = React.useState(),
27367
27370
  _useState14 = _slicedToArray(_useState13, 2),
27368
- attemptId = _useState14[0],
27369
- setAttemptId = _useState14[1];
27370
- var _useState15 = React.useState(false),
27371
+ paymentRoute = _useState14[0],
27372
+ setPaymentRoute = _useState14[1];
27373
+ var _useState15 = React.useState(),
27371
27374
  _useState16 = _slicedToArray(_useState15, 2),
27372
- trackingInitialized = _useState16[0],
27373
- setTrackingInitialized = _useState16[1];
27374
- var _useState17 = React.useState(!!configurationId || !!(track && (track.endpoint || typeof track.method == 'function') && track.async != true)),
27375
- _useState18 = _slicedToArray(_useState17, 1),
27376
- synchronousTracking = _useState18[0];
27377
- var _useState19 = React.useState(!configurationId && !!(track && track.async == true)),
27375
+ attemptId = _useState16[0],
27376
+ setAttemptId = _useState16[1];
27377
+ var attemptIdRef = React.useRef(attemptId);
27378
+ attemptIdRef.current = attemptId;
27379
+ var _useState17 = React.useState(false),
27380
+ _useState18 = _slicedToArray(_useState17, 2),
27381
+ trackingInitialized = _useState18[0],
27382
+ setTrackingInitialized = _useState18[1];
27383
+ var _useState19 = React.useState(!!configurationId || !!(track && (track.endpoint || typeof track.method == 'function') && track.async != true)),
27378
27384
  _useState20 = _slicedToArray(_useState19, 1),
27379
- asynchronousTracking = _useState20[0];
27380
- var _useState21 = React.useState(!!configurationId || !!(track && track.poll && (track.poll.endpoint || typeof track.poll.method == 'function') && track.async != true)),
27385
+ synchronousTracking = _useState20[0];
27386
+ var _useState21 = React.useState(!configurationId && !!(track && track.async == true)),
27381
27387
  _useState22 = _slicedToArray(_useState21, 1),
27382
- polling = _useState22[0];
27383
- var _useState23 = React.useState(false),
27384
- _useState24 = _slicedToArray(_useState23, 2),
27385
- release = _useState24[0],
27386
- setRelease = _useState24[1];
27387
- var _useState25 = React.useState(),
27388
+ asynchronousTracking = _useState22[0];
27389
+ var _useState23 = React.useState(!!configurationId || !!(track && track.poll && (track.poll.endpoint || typeof track.poll.method == 'function') && track.async != true)),
27390
+ _useState24 = _slicedToArray(_useState23, 1),
27391
+ polling = _useState24[0];
27392
+ var _useState25 = React.useState(false),
27388
27393
  _useState26 = _slicedToArray(_useState25, 2),
27389
- forwardTo = _useState26[0],
27390
- setForwardTo = _useState26[1];
27394
+ release = _useState26[0],
27395
+ setRelease = _useState26[1];
27396
+ var _useState27 = React.useState(),
27397
+ _useState28 = _slicedToArray(_useState27, 2),
27398
+ forwardTo = _useState28[0],
27399
+ setForwardTo = _useState28[1];
27391
27400
  var _useContext4 = React.useContext(ClosableContext),
27392
27401
  setClosable = _useContext4.setClosable;
27393
27402
  var _useContext5 = React.useContext(NavigateContext),
@@ -27471,18 +27480,18 @@
27471
27480
  console.log('WebSocket Error: ', error);
27472
27481
  };
27473
27482
  };
27474
- var retryStartTracking = function retryStartTracking(transaction, afterBlock, paymentRoute, attempt) {
27483
+ var retryStartTracking = function retryStartTracking(transaction, afterBlock, paymentRoute, deadline, attempt) {
27475
27484
  attempt = parseInt(attempt || 1, 10);
27476
27485
  if (attempt < ((track === null || track === void 0 ? void 0 : track.attempts) || 40)) {
27477
27486
  setTimeout(function () {
27478
- startTracking(transaction, afterBlock, paymentRoute, attempt + 1);
27487
+ startTracking(transaction, afterBlock, paymentRoute, deadline, attempt + 1);
27479
27488
  }, 3000);
27480
27489
  } else {
27481
27490
  navigate('TrackingFailed');
27482
27491
  }
27483
27492
  };
27484
27493
  var continueTryTracking = function continueTryTracking() {
27485
- retryStartTracking(transaction, afterBlock, paymentRoute, 1);
27494
+ retryStartTracking(transaction, afterBlock, paymentRoute, deadline, 1);
27486
27495
  };
27487
27496
  var callTracking = function callTracking(payment) {
27488
27497
  if (configurationId) {
@@ -27523,7 +27532,7 @@
27523
27532
  }
27524
27533
  };
27525
27534
  var startTracking = /*#__PURE__*/function () {
27526
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(transaction, afterBlock, paymentRoute, attempt) {
27535
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee2(transaction, afterBlock, paymentRoute, deadline, attempt) {
27527
27536
  var _paymentRoute$feeAmou;
27528
27537
  return regenerator.wrap(function _callee2$(_context2) {
27529
27538
  while (1) switch (_context2.prev = _context2.next) {
@@ -27548,8 +27557,9 @@
27548
27557
  _context2.t10 = paymentRoute.toAmount.toString();
27549
27558
  _context2.t11 = paymentRoute.toDecimals;
27550
27559
  _context2.t12 = paymentRoute === null || paymentRoute === void 0 || (_paymentRoute$feeAmou = paymentRoute.feeAmount) === null || _paymentRoute$feeAmou === void 0 ? void 0 : _paymentRoute$feeAmou.toString();
27551
- _context2.t13 = transaction.deadline;
27552
- _context2.t14 = {
27560
+ _context2.t13 = attemptIdRef.current;
27561
+ _context2.t14 = deadline;
27562
+ _context2.t15 = {
27553
27563
  blockchain: _context2.t1,
27554
27564
  transaction: _context2.t2,
27555
27565
  sender: _context2.t3,
@@ -27562,25 +27572,26 @@
27562
27572
  to_amount: _context2.t10,
27563
27573
  to_decimals: _context2.t11,
27564
27574
  fee_amount: _context2.t12,
27565
- deadline: _context2.t13
27575
+ trace_attempt_id: _context2.t13,
27576
+ deadline: _context2.t14
27566
27577
  };
27567
- (0, _context2.t0)(_context2.t14).then(function (response) {
27578
+ (0, _context2.t0)(_context2.t15).then(function (response) {
27568
27579
  setTrackingInitialized(true);
27569
27580
  })["catch"](function (error) {
27570
- retryStartTracking(transaction, afterBlock, paymentRoute, attempt);
27581
+ retryStartTracking(transaction, afterBlock, paymentRoute, deadline, attempt);
27571
27582
  });
27572
- case 18:
27583
+ case 19:
27573
27584
  case "end":
27574
27585
  return _context2.stop();
27575
27586
  }
27576
27587
  }, _callee2);
27577
27588
  }));
27578
- return function startTracking(_x2, _x3, _x4, _x5) {
27589
+ return function startTracking(_x2, _x3, _x4, _x5, _x6) {
27579
27590
  return _ref2.apply(this, arguments);
27580
27591
  };
27581
27592
  }();
27582
27593
  var pollStatus = /*#__PURE__*/function () {
27583
- var _ref3 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee3(polling, transaction, afterBlock, paymentRoute, pollingInterval) {
27594
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee3(polling, transaction, afterBlock, paymentRoute, pollingInterval, attemptId) {
27584
27595
  var payment, handlePollingResponse;
27585
27596
  return regenerator.wrap(function _callee3$(_context3) {
27586
27597
  while (1) switch (_context3.prev = _context3.next) {
@@ -27667,7 +27678,7 @@
27667
27678
  }
27668
27679
  }, _callee3);
27669
27680
  }));
27670
- return function pollStatus(_x6, _x7, _x8, _x9, _x10) {
27681
+ return function pollStatus(_x7, _x8, _x9, _x10, _x11, _x12) {
27671
27682
  return _ref3.apply(this, arguments);
27672
27683
  };
27673
27684
  }();
@@ -27684,14 +27695,14 @@
27684
27695
  return;
27685
27696
  }
27686
27697
  var pollingInterval = setInterval(function () {
27687
- return pollStatus(polling, transaction, afterBlock, paymentRoute, pollingInterval);
27698
+ return pollStatus(polling, transaction, afterBlock, paymentRoute, pollingInterval, attemptId);
27688
27699
  }, 5000);
27689
27700
  return function () {
27690
27701
  clearInterval(pollingInterval);
27691
27702
  };
27692
- }, [polling, transaction, afterBlock, paymentRoute]);
27703
+ }, [polling, transaction, afterBlock, attemptId, paymentRoute]);
27693
27704
  var storePayment = /*#__PURE__*/function () {
27694
- var _ref4 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee4(transaction, afterBlock, paymentRoute) {
27705
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee4(transaction, afterBlock, paymentRoute, deadline) {
27695
27706
  return regenerator.wrap(function _callee4$(_context4) {
27696
27707
  while (1) switch (_context4.prev = _context4.next) {
27697
27708
  case 0:
@@ -27726,7 +27737,7 @@
27726
27737
  };
27727
27738
  _context4.t13 = paymentRoute.fee ? ethers.ethers.utils.formatUnits(paymentRoute.feeAmount, paymentRoute.toDecimals) : null;
27728
27739
  _context4.t14 = paymentRoute.fee ? paymentRoute.fee.receiver : null;
27729
- _context4.t15 = transaction.deadline;
27740
+ _context4.t15 = deadline;
27730
27741
  _context4.t16 = {
27731
27742
  blockchain: _context4.t3,
27732
27743
  transaction: _context4.t4,
@@ -27752,12 +27763,12 @@
27752
27763
  (0, _context4.t0)('https://public.depay.com/payments', _context4.t18).then(function (response) {
27753
27764
  if (response.status == 200 || response.status == 201) ; else {
27754
27765
  setTimeout(function () {
27755
- storePayment(transaction, afterBlock, paymentRoute);
27766
+ storePayment(transaction, afterBlock, paymentRoute, deadline);
27756
27767
  }, 3000);
27757
27768
  }
27758
27769
  })["catch"](function (error) {
27759
27770
  setTimeout(function () {
27760
- storePayment(transaction, afterBlock, paymentRoute);
27771
+ storePayment(transaction, afterBlock, paymentRoute, deadline);
27761
27772
  }, 3000);
27762
27773
  });
27763
27774
  case 22:
@@ -27766,24 +27777,26 @@
27766
27777
  }
27767
27778
  }, _callee4);
27768
27779
  }));
27769
- return function storePayment(_x11, _x12, _x13) {
27780
+ return function storePayment(_x13, _x14, _x15, _x16) {
27770
27781
  return _ref4.apply(this, arguments);
27771
27782
  };
27772
27783
  }();
27773
- var initializeTracking = function initializeTracking(transaction, afterBlock, paymentRoute) {
27774
- storePayment(transaction, afterBlock, paymentRoute);
27784
+ var initializeTracking = function initializeTracking(transaction, afterBlock, paymentRoute, deadline) {
27785
+ storePayment(transaction, afterBlock, paymentRoute, deadline);
27775
27786
  if (synchronousTracking || track && track.async == true) {
27776
- startTracking(transaction, afterBlock, paymentRoute);
27787
+ startTracking(transaction, afterBlock, paymentRoute, deadline);
27777
27788
  }
27778
27789
  if (synchronousTracking == false) {
27779
27790
  return;
27780
27791
  }
27792
+ setDeadline(deadline);
27781
27793
  setTransaction(transaction);
27782
27794
  setAfterBlock(afterBlock);
27783
27795
  setPaymentRoute(paymentRoute);
27784
27796
  openSocket(transaction);
27785
27797
  };
27786
- var trace = function trace(afterBlock, paymentRoute, transaction) {
27798
+ var trace = function trace(afterBlock, paymentRoute, transaction, deadline) {
27799
+ setAttemptId(); // reset attemptId in case payment is retried
27787
27800
  if (!synchronousTracking && !asynchronousTracking) {
27788
27801
  return Promise.resolve();
27789
27802
  }
@@ -27812,7 +27825,7 @@
27812
27825
  _context5.t8 = paymentRoute.toAmount.toString();
27813
27826
  _context5.t9 = paymentRoute.toDecimals;
27814
27827
  _context5.t10 = paymentRoute === null || paymentRoute === void 0 || (_paymentRoute$feeAmou2 = paymentRoute.feeAmount) === null || _paymentRoute$feeAmou2 === void 0 ? void 0 : _paymentRoute$feeAmou2.toString();
27815
- _context5.t11 = transaction.deadline;
27828
+ _context5.t11 = deadline;
27816
27829
  payment = {
27817
27830
  blockchain: _context5.t0,
27818
27831
  sender: _context5.t1,
@@ -27877,7 +27890,7 @@
27877
27890
  }
27878
27891
  }, _callee5);
27879
27892
  }));
27880
- return function (_x14, _x15) {
27893
+ return function (_x17, _x18) {
27881
27894
  return _ref5.apply(this, arguments);
27882
27895
  };
27883
27896
  }());
@@ -36942,17 +36955,16 @@
36942
36955
  }
36943
36956
  }, [polling]);
36944
36957
  var createTracking = /*#__PURE__*/function () {
36945
- var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(transaction, afterBlock, attempt) {
36958
+ var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(transaction, afterBlock, deadline, attempt) {
36946
36959
  return regenerator.wrap(function _callee$(_context) {
36947
36960
  while (1) switch (_context.prev = _context.next) {
36948
36961
  case 0:
36949
36962
  if (!(attempt > 3)) {
36950
- _context.next = 3;
36963
+ _context.next = 2;
36951
36964
  break;
36952
36965
  }
36953
- console.log('TRANSACTION TRACKING FAILED AFTER 3 ATTEMPTS!');
36954
36966
  return _context.abrupt("return");
36955
- case 3:
36967
+ case 2:
36956
36968
  _context.t0 = fetch;
36957
36969
  _context.t1 = {
36958
36970
  'Content-Type': 'application/json'
@@ -36962,40 +36974,38 @@
36962
36974
  _context.t4 = afterBlock.toString();
36963
36975
  _context.t5 = transaction.blockchain;
36964
36976
  _context.t6 = transaction.from;
36965
- _context.next = 12;
36977
+ _context.next = 11;
36966
36978
  return getNonce({
36967
36979
  transaction: transaction,
36968
36980
  wallet: wallet,
36969
36981
  account: account
36970
36982
  });
36971
- case 12:
36983
+ case 11:
36972
36984
  _context.t7 = _context.sent;
36973
- _context.t8 = {
36985
+ _context.t8 = deadline;
36986
+ _context.t9 = {
36974
36987
  id: _context.t3,
36975
36988
  after_block: _context.t4,
36976
36989
  blockchain: _context.t5,
36977
36990
  sender: _context.t6,
36978
- nonce: _context.t7
36991
+ nonce: _context.t7,
36992
+ deadline: _context.t8
36979
36993
  };
36980
- _context.t9 = _context.t2.stringify.call(_context.t2, _context.t8);
36981
- _context.t10 = {
36994
+ _context.t10 = _context.t2.stringify.call(_context.t2, _context.t9);
36995
+ _context.t11 = {
36982
36996
  method: 'POST',
36983
36997
  headers: _context.t1,
36984
- body: _context.t9
36998
+ body: _context.t10
36985
36999
  };
36986
- (0, _context.t0)('https://public.depay.com/transactions', _context.t10).then(function (response) {
36987
- if (response.status == 200 || response.status == 201) {
36988
- console.log('TRANSACTION TRACKING INITIALIZED');
36989
- } else {
36990
- console.log('TRANSACTION TRACKING FAILED', response);
37000
+ (0, _context.t0)('https://public.depay.com/transactions', _context.t11).then(function (response) {
37001
+ if (response.status == 200 || response.status == 201) ; else {
36991
37002
  setTimeout(function () {
36992
- createTracking(transaction, afterBlock, attempt + 1);
37003
+ createTracking(transaction, afterBlock, deadline, attempt + 1);
36993
37004
  }, 3000);
36994
37005
  }
36995
37006
  })["catch"](function (error) {
36996
- console.log('TRANSACTION TRACKING FAILED', error);
36997
37007
  setTimeout(function () {
36998
- createTracking(transaction, afterBlock, attempt + 1);
37008
+ createTracking(transaction, afterBlock, deadline, attempt + 1);
36999
37009
  }, 3000);
37000
37010
  });
37001
37011
  case 17:
@@ -37004,7 +37014,7 @@
37004
37014
  }
37005
37015
  }, _callee);
37006
37016
  }));
37007
- return function createTracking(_x, _x2, _x3) {
37017
+ return function createTracking(_x, _x2, _x3, _x4) {
37008
37018
  return _ref.apply(this, arguments);
37009
37019
  };
37010
37020
  }();
@@ -37045,7 +37055,7 @@
37045
37055
  }
37046
37056
  }, _callee2);
37047
37057
  }));
37048
- return function (_x4) {
37058
+ return function (_x5) {
37049
37059
  return _ref2.apply(this, arguments);
37050
37060
  };
37051
37061
  }();
@@ -37070,13 +37080,13 @@
37070
37080
  console.log('WebSocket Error: ', error);
37071
37081
  };
37072
37082
  };
37073
- var initializeTracking = function initializeTracking(transaction, afterBlock) {
37083
+ var initializeTracking = function initializeTracking(transaction, afterBlock, deadline) {
37074
37084
  if (!supported$4.evm.includes(transaction.blockchain)) {
37075
37085
  return;
37076
37086
  }
37077
37087
  setGivenTransaction(transaction);
37078
37088
  if (recover == undefined) {
37079
- createTracking(transaction, afterBlock, 1);
37089
+ createTracking(transaction, afterBlock, deadline, 1);
37080
37090
  }
37081
37091
  openSocket(transaction);
37082
37092
  setPolling(true);