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