File tree Expand file tree Collapse file tree 1 file changed +11
-10
lines changed
packages/wallet-sdk/src/sign/walletlink/relay/ui Expand file tree Collapse file tree 1 file changed +11
-10
lines changed Original file line number Diff line number Diff line change 1+ import { CBW_MOBILE_DEEPLINK_URL } from ':core/constants.js' ;
2+ import { RelayUI } from './RelayUI.js' ;
13import { RedirectDialog } from './components/RedirectDialog/RedirectDialog.js' ;
24import { getLocation } from './components/util.js' ;
3- import { RelayUI } from './RelayUI.js' ;
4- import { CBW_MOBILE_DEEPLINK_URL } from ':core/constants.js' ;
55
66export class WLMobileRelayUI implements RelayUI {
77 private readonly redirectDialog : RedirectDialog ;
@@ -35,16 +35,17 @@ export class WLMobileRelayUI implements RelayUI {
3535 }
3636
3737 openCoinbaseWalletDeeplink ( walletLinkUrl ?: string ) : void {
38- this . redirectDialog . present ( {
39- title : 'Redirecting to Coinbase Wallet...' ,
40- buttonText : 'Open' ,
41- onButtonClick : ( ) => {
42- this . redirectToCoinbaseWallet ( walletLinkUrl ) ;
43- } ,
44- } ) ;
38+ // redirect to coinbase wallet immediately to avoid Safari/Chrome popup(deeplink) blocking
39+ this . redirectToCoinbaseWallet ( walletLinkUrl ) ;
4540
4641 setTimeout ( ( ) => {
47- this . redirectToCoinbaseWallet ( walletLinkUrl ) ;
42+ this . redirectDialog . present ( {
43+ title : 'Redirecting to Coinbase Wallet...' ,
44+ buttonText : 'Open' ,
45+ onButtonClick : ( ) => {
46+ this . redirectToCoinbaseWallet ( walletLinkUrl ) ;
47+ } ,
48+ } ) ;
4849 } , 99 ) ;
4950 }
5051
You can’t perform that action at this time.
0 commit comments