From 5b0af513c93a34ca261fb6175a02db478bba5a61 Mon Sep 17 00:00:00 2001 From: Bizordec Date: Wed, 25 Jan 2023 22:29:30 +0000 Subject: [PATCH] fix: autoConnect not working in Firefox --- src/connectors/metaMask.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/connectors/metaMask.ts b/src/connectors/metaMask.ts index 5061267..01d3655 100644 --- a/src/connectors/metaMask.ts +++ b/src/connectors/metaMask.ts @@ -74,7 +74,7 @@ export class MetaMaskConnector extends Connector< static async checkConnection() { if (typeof window !== 'undefined' && !!window.ethereum) { const provider = window.ethereum as MetaMaskProvider - if (provider.selectedAddress) { + if ((await provider.request({ method: 'eth_accounts' })).length !== 0) { return true } }