Skip to content

Commit

Permalink
Merge pull request #1036 from DarkFlorist/signer-account-race-condition
Browse files Browse the repository at this point in the history
prevent race condition with signer connections. No need to wait for signer accounts if we already have them, or already are waiting for them
  • Loading branch information
KillariDev authored Jun 10, 2024
2 parents 969130e + 8013a22 commit a16e37f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/inpage/ts/inpage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ class InterceptorMessageListener {
}

if (signerName !== 'NoSigner') {
this.waitForAccountsFromWallet = new InterceptorFuture()
if (this.waitForAccountsFromWallet === undefined && this.signerAccounts.length === 0) this.waitForAccountsFromWallet = new InterceptorFuture()
this.enableMetamaskCompatibilityMode((await connectToSigner()).metamaskCompatibilityMode)
await this.requestChainIdFromSigner()
await this.getAccountsFromSigner()
Expand Down

0 comments on commit a16e37f

Please sign in to comment.