Skip to content

Commit

Permalink
Merge pull request #85 from argentlabs/fix/ww-starknetkit-connect
Browse files Browse the repository at this point in the history
fix: webwallet connector connect method
  • Loading branch information
bluecco authored Mar 8, 2024
2 parents ed084e5 + ed1c7c2 commit 0179954
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 0179954

Please sign in to comment.