Skip to content

Commit

Permalink
Fix/deeplink from webview for android (#1121)
Browse files Browse the repository at this point in the history
* fix: anchor tag approach to cover both iOS and Android cases

* fix: add expected target

---------

Co-authored-by: Pedro Rosario <[email protected]>
  • Loading branch information
pedrorosarioo and cb-pedro-rosario authored Feb 24, 2024
1 parent 9aba4c2 commit c57516a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/wallet-sdk/src/relay/mobile/MobileRelayUI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ export class MobileRelayUI implements RelayUI {
url.searchParams.append('wl_url', walletLinkUrl);
}

window.location.href = url.href;

const anchorTag = document.createElement('a');
anchorTag.target = 'cbw-opener';
anchorTag.href = url.href;
anchorTag.rel = 'noreferrer noopener';
anchorTag.click();
}

openCoinbaseWalletDeeplink(walletLinkUrl?: string): void {
Expand Down

0 comments on commit c57516a

Please sign in to comment.