Skip to content

Commit

Permalink
fix: resolves #3165
Browse files Browse the repository at this point in the history
  • Loading branch information
jxom committed Apr 1, 2024
1 parent b3b54ef commit 4ec088c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/core/src/connectors/injected.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {
type Address,
type EIP1193Provider,
type ProviderConnectInfo,
ProviderRpcError,
Expand Down Expand Up @@ -145,9 +144,8 @@ export function injected(parameters: InjectedParameters = {}) {
const provider = await this.getProvider()
if (!provider) throw new ProviderNotFoundError()

let accounts: readonly Address[] | null = null
let accounts = await this.getAccounts().catch(() => null)
if (!isReconnecting) {
accounts = await this.getAccounts().catch(() => null)
// Attempt to show another prompt for selecting account if already connected and `shimDisconnect` flag is enabled
const isAuthorized = shimDisconnect && !!accounts?.length
if (isAuthorized)
Expand Down

0 comments on commit 4ec088c

Please sign in to comment.