Skip to content

Commit

Permalink
fix: ignore Cannot read properties of undefined from wagmi (#1029)
Browse files Browse the repository at this point in the history
  • Loading branch information
agualis authored Aug 30, 2024
1 parent c31edbf commit edd4e5e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/shared/utils/query-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,5 +278,19 @@ function shouldIgnore(e: Error): boolean {
return true
}

/*
Wagmi error which does not crash.
Can be reproduced by:
1. Connect with Rabby
2. Disconnect Rabby from the app
3. Click "Connect wallet" and chose WalletConnect
*/
if (
e.message === "Cannot read properties of undefined (reading 'address')" &&
e.stack?.includes('getWalletClient.js')
) {
return true
}

return false
}

0 comments on commit edd4e5e

Please sign in to comment.