@depay/widgets 12.3.4 → 12.3.6

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
@@ -27412,11 +27412,6 @@ var PaymentTrackingProvider = (function (props) {
27412
27412
  setRelease(true);
27413
27413
  setClosable(true);
27414
27414
  setForwardTo(item.message.forward_to);
27415
- if (!!item.message.forward_to) {
27416
- setTimeout(function () {
27417
- props.document.location.href = item.message.forward_to;
27418
- }, 200);
27419
- }
27420
27415
  } else if (success == false) {
27421
27416
  setClosable(true);
27422
27417
  set(['PaymentFailed']);
@@ -27576,9 +27571,6 @@ var PaymentTrackingProvider = (function (props) {
27576
27571
  if (data && data.forward_to) {
27577
27572
  setClosable(true);
27578
27573
  setForwardTo(data.forward_to);
27579
- setTimeout(function () {
27580
- props.document.location.href = data.forward_to;
27581
- }, 200);
27582
27574
  } else {
27583
27575
  setClosable(true);
27584
27576
  }
@@ -27633,6 +27625,11 @@ var PaymentTrackingProvider = (function (props) {
27633
27625
  return _ref3.apply(this, arguments);
27634
27626
  };
27635
27627
  }();
27628
+ useEffect(function () {
27629
+ if (forwardTo) {
27630
+ props.document.location.href = forwardTo;
27631
+ }
27632
+ }, [forwardTo]);
27636
27633
  useEffect(function () {
27637
27634
  if (!polling) {
27638
27635
  return;