@dubsdotapp/expo 0.2.15 → 0.2.16

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/index.mjs CHANGED
@@ -745,11 +745,14 @@ var DeeplinkHandler = class {
745
745
  console.log(TAG, "No pending requests to resolve \u2014 redirect may have arrived late");
746
746
  }
747
747
  }
748
- /** Try to extract a request ID from the URL path segment after the redirect base. */
748
+ /** Extract the request ID from the dubs_rid query parameter. */
749
749
  extractRequestId(url) {
750
- const afterBase = url.slice(this.redirectBase.length);
751
- const match = afterBase.match(/^\/?([a-zA-Z0-9_-]+)/);
752
- return match?.[1] ?? null;
750
+ try {
751
+ const parsed = new URL(url);
752
+ return parsed.searchParams.get("dubs_rid");
753
+ } catch {
754
+ return null;
755
+ }
753
756
  }
754
757
  };
755
758
 
@@ -822,7 +825,7 @@ var PhantomDeeplinkAdapter = class {
822
825
  const dappPubBase58 = bs582.encode(this._dappKeyPair.publicKey);
823
826
  console.log(TAG2, "Dapp public key:", dappPubBase58);
824
827
  const requestId = nextRequestId();
825
- const redirectLink = `${this.config.redirectUri}/${requestId}`;
828
+ const redirectLink = `${this.config.redirectUri}?dubs_rid=${requestId}`;
826
829
  console.log(TAG2, `connect() requestId=${requestId} redirectLink=${redirectLink}`);
827
830
  const appUrl = this.config.appUrl || this.config.redirectUri;
828
831
  console.log(TAG2, "Using app_url:", appUrl);
@@ -883,7 +886,7 @@ var PhantomDeeplinkAdapter = class {
883
886
  this._sharedSecret
884
887
  );
885
888
  const requestId = nextRequestId();
886
- const redirectLink = `${this.config.redirectUri}/${requestId}`;
889
+ const redirectLink = `${this.config.redirectUri}?dubs_rid=${requestId}`;
887
890
  console.log(TAG2, `signTransaction() requestId=${requestId}`);
888
891
  const params = new URLSearchParams({
889
892
  dapp_encryption_public_key: bs582.encode(this._dappKeyPair.publicKey),
@@ -915,7 +918,7 @@ var PhantomDeeplinkAdapter = class {
915
918
  this._sharedSecret
916
919
  );
917
920
  const requestId = nextRequestId();
918
- const redirectLink = `${this.config.redirectUri}/${requestId}`;
921
+ const redirectLink = `${this.config.redirectUri}?dubs_rid=${requestId}`;
919
922
  console.log(TAG2, `signAndSendTransaction() requestId=${requestId}`);
920
923
  const params = new URLSearchParams({
921
924
  dapp_encryption_public_key: bs582.encode(this._dappKeyPair.publicKey),
@@ -943,7 +946,7 @@ var PhantomDeeplinkAdapter = class {
943
946
  this._sharedSecret
944
947
  );
945
948
  const requestId = nextRequestId();
946
- const redirectLink = `${this.config.redirectUri}/${requestId}`;
949
+ const redirectLink = `${this.config.redirectUri}?dubs_rid=${requestId}`;
947
950
  console.log(TAG2, `signMessage() requestId=${requestId}`);
948
951
  const params = new URLSearchParams({
949
952
  dapp_encryption_public_key: bs582.encode(this._dappKeyPair.publicKey),