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) { if (provider!==null) {
try { try {
console.log('getSigner') console.log('getSigner')
await provider.getSigner() const p = new BrowserProvider(window.ethereum, chainId)
await updateAccounts(chainId, provider) await p.getSigner()
await updateAccounts(chainId, p)
} }
catch (e) { catch (e) {
if (e.reason!=='rejected') if (e.reason!=='rejected')
console.error(e, e.reason) console.error(e, e.reason)
} }
} }
else
console.error('provider was null after chain switch')
} }