@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.
@@ -23698,6 +23698,18 @@ var internalVerify = async ({ signature, publicKey, data, saltLength = 64, crypt
23698
23698
  data = JSON.stringify(data);
23699
23699
  }
23700
23700
 
23701
+ if(typeof signature !== 'string' || signature === undefined) {
23702
+ throw('signature missing!')
23703
+ }
23704
+
23705
+ if(data === undefined || data.length === 0) {
23706
+ throw('data missing!')
23707
+ }
23708
+
23709
+ if(publicKey === undefined || typeof publicKey !== 'string' || publicKey.length === 0) {
23710
+ throw('publicKey missing!')
23711
+ }
23712
+
23701
23713
  let innerPublicKey = publicKey.replace(/^.*?-----BEGIN PUBLIC KEY-----\n/, '').replace(/-----END PUBLIC KEY-----(\n)*$/, '').replace(/(\n)*/g, '');
23702
23714
  while (innerPublicKey.length % 4) { // add proper padding
23703
23715
  innerPublicKey += '=';
@@ -27454,11 +27466,6 @@ var PaymentTrackingProvider = (function (props) {
27454
27466
  setRelease(true);
27455
27467
  setClosable(true);
27456
27468
  setForwardTo(item.message.forward_to);
27457
- if (!!item.message.forward_to) {
27458
- setTimeout(function () {
27459
- props.document.location.href = item.message.forward_to;
27460
- }, 200);
27461
- }
27462
27469
  } else if (success == false) {
27463
27470
  setClosable(true);
27464
27471
  set(['PaymentFailed']);
@@ -27618,9 +27625,6 @@ var PaymentTrackingProvider = (function (props) {
27618
27625
  if (data && data.forward_to) {
27619
27626
  setClosable(true);
27620
27627
  setForwardTo(data.forward_to);
27621
- setTimeout(function () {
27622
- props.document.location.href = data.forward_to;
27623
- }, 200);
27624
27628
  } else {
27625
27629
  setClosable(true);
27626
27630
  }
@@ -27675,6 +27679,11 @@ var PaymentTrackingProvider = (function (props) {
27675
27679
  return _ref3.apply(this, arguments);
27676
27680
  };
27677
27681
  }();
27682
+ useEffect(function () {
27683
+ if (forwardTo) {
27684
+ props.document.location.href = forwardTo;
27685
+ }
27686
+ }, [forwardTo]);
27678
27687
  useEffect(function () {
27679
27688
  if (!polling) {
27680
27689
  return;