Skip to content

Commit

Permalink
fix(connectors): capture cb smart wallet close
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm committed Jun 10, 2024
1 parent c90c49d commit 560952a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tall-poems-press.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wagmi/connectors": patch
---

Captured Coinbase Smart Wallet error when closing window as EIP-1193 `4001` error.
2 changes: 1 addition & 1 deletion packages/connectors/src/coinbaseWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function version4(parameters: Version4Parameters) {
return { accounts, chainId: currentChainId }
} catch (error) {
if (
/(user closed modal|accounts received is empty|user denied account)/i.test(
/(user closed modal|accounts received is empty|user denied account|request rejected)/i.test(
(error as Error).message,
)
)
Expand Down

0 comments on commit 560952a

Please sign in to comment.