wallet connection fixes
This commit is contained in:
@@ -144,16 +144,15 @@ export async function connectWallet(chainId) {
|
||||
if (provider!==null) {
|
||||
try {
|
||||
console.log('getSigner')
|
||||
await provider.getSigner()
|
||||
await updateAccounts(chainId, provider)
|
||||
const p = new BrowserProvider(window.ethereum, chainId)
|
||||
await p.getSigner()
|
||||
await updateAccounts(chainId, p)
|
||||
}
|
||||
catch (e) {
|
||||
if (e.reason!=='rejected')
|
||||
console.error(e, e.reason)
|
||||
}
|
||||
}
|
||||
else
|
||||
console.error('provider was null after chain switch')
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user