File tree Expand file tree Collapse file tree 3 files changed +12
-4
lines changed
apps/playground-web/src/components/sign-in
packages/thirdweb/src/wallets/wallet-connect Expand file tree Collapse file tree 3 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " thirdweb " : patch
3+ ---
4+
5+ Fix prompting for generic WC connection on mobile
Original file line number Diff line number Diff line change 11"use client" ;
2-
32import {
43 useActiveAccount ,
54 useActiveWallet ,
@@ -39,7 +38,9 @@ export function HooksPreview() {
3938 </ >
4039 ) : (
4140 < Button variant = "default" onClick = { connect } >
42- Connect with Metamask
41+ { connectMutation . isConnecting
42+ ? "Connecting..."
43+ : "Connect with Metamask" }
4344 </ Button >
4445 ) }
4546 </ div >
Original file line number Diff line number Diff line change @@ -93,12 +93,14 @@ export async function connectWC(
9393 let { onDisplayUri } = wcOptions || { } ;
9494
9595 // use default sessionHandler unless onDisplayUri is explicitly provided
96- if ( ! onDisplayUri && sessionHandler && walletId !== "walletConnect" ) {
96+ if ( ! onDisplayUri && sessionHandler ) {
9797 const walletInfo = await getWalletInfo ( walletId ) ;
9898 const deeplinkHandler = ( uri : string ) => {
9999 const appUrl = walletInfo . mobile . native || walletInfo . mobile . universal ;
100100 if ( ! appUrl ) {
101- throw new Error ( "No app url found for wallet connect to redirect to." ) ;
101+ // generic wc uri
102+ sessionHandler ( uri ) ;
103+ return ;
102104 }
103105 const fullUrl = formatWalletConnectUrl ( appUrl , uri ) . redirect ;
104106 sessionHandler ( fullUrl ) ;
You can’t perform that action at this time.
0 commit comments