wallet connection fixes

This commit is contained in:
Tim
2024-04-11 20:00:37 -04:00
parent db2feb8842
commit b7198ef7db

View File

@@ -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')
}