diff --git a/src/context/WalletContext.tsx b/src/context/WalletContext.tsx index 8047b93..c363c78 100644 --- a/src/context/WalletContext.tsx +++ b/src/context/WalletContext.tsx @@ -46,6 +46,10 @@ export const WalletContextProvider = ({ signerOrProvider: string | providers.Provider | Signer, address: string ) => { + const provider = dappRegistry.provider; + + console.log(provider); + try { setLoading(true); dappRegistry.connect(signerOrProvider); @@ -59,6 +63,7 @@ export const WalletContextProvider = ({ }); } catch (error) { removeWallet(); + dappRegistry.connect(provider); throw error; } finally { setLoading(false);