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