Skip to content

Commit

Permalink
fix: autoConnect not working in Firefox
Browse files Browse the repository at this point in the history
  • Loading branch information
Bizordec committed Jan 25, 2023
1 parent be2bb15 commit 5b0af51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/connectors/metaMask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit 5b0af51

Please sign in to comment.