Skip to content

Commit

Permalink
fix: webwallet connector connect method
Browse files Browse the repository at this point in the history
  • Loading branch information
bluecco committed Mar 8, 2024
1 parent ed084e5 commit ed1c7c2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/connectors/webwallet/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ export class WebWalletConnector extends Connector {
throw new UserRejectedRequestError()
}

// Prevent trpc from throwing an error (closed prematurely)
// this happens when 2 requests to webwallet are made in a row (trpc-browser is closing the first popup and requesting a new one right after)
// won't be needed with chrome iframes will be enabled again (but still needed for other browsers)
await new Promise((r) => setTimeout(r, 100))
const chainId = await this.chainId()

return {
Expand Down

0 comments on commit ed1c7c2

Please sign in to comment.