@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.
@@ -23697,6 +23697,18 @@ var internalVerify = async ({ signature, publicKey, data, saltLength = 64, crypt
23697
23697
  data = JSON.stringify(data);
23698
23698
  }
23699
23699
 
23700
+ if(typeof signature !== 'string' || signature === undefined) {
23701
+ throw('signature missing!')
23702
+ }
23703
+
23704
+ if(data === undefined || data.length === 0) {
23705
+ throw('data missing!')
23706
+ }
23707
+
23708
+ if(publicKey === undefined || typeof publicKey !== 'string' || publicKey.length === 0) {
23709
+ throw('publicKey missing!')
23710
+ }
23711
+
23700
23712
  let innerPublicKey = publicKey.replace(/^.*?-----BEGIN PUBLIC KEY-----\n/, '').replace(/-----END PUBLIC KEY-----(\n)*$/, '').replace(/(\n)*/g, '');
23701
23713
  while (innerPublicKey.length % 4) { // add proper padding
23702
23714
  innerPublicKey += '=';
@@ -27413,11 +27425,6 @@ var PaymentTrackingProvider = (function (props) {
27413
27425
  setRelease(true);
27414
27426
  setClosable(true);
27415
27427
  setForwardTo(item.message.forward_to);
27416
- if (!!item.message.forward_to) {
27417
- setTimeout(function () {
27418
- props.document.location.href = item.message.forward_to;
27419
- }, 200);
27420
- }
27421
27428
  } else if (success == false) {
27422
27429
  setClosable(true);
27423
27430
  set(['PaymentFailed']);
@@ -27577,9 +27584,6 @@ var PaymentTrackingProvider = (function (props) {
27577
27584
  if (data && data.forward_to) {
27578
27585
  setClosable(true);
27579
27586
  setForwardTo(data.forward_to);
27580
- setTimeout(function () {
27581
- props.document.location.href = data.forward_to;
27582
- }, 200);
27583
27587
  } else {
27584
27588
  setClosable(true);
27585
27589
  }
@@ -27634,6 +27638,11 @@ var PaymentTrackingProvider = (function (props) {
27634
27638
  return _ref3.apply(this, arguments);
27635
27639
  };
27636
27640
  }();
27641
+ useEffect(function () {
27642
+ if (forwardTo) {
27643
+ props.document.location.href = forwardTo;
27644
+ }
27645
+ }, [forwardTo]);
27637
27646
  useEffect(function () {
27638
27647
  if (!polling) {
27639
27648
  return;