Skip to content

Commit

Permalink
fix(dcellar-web-ui): compatiable error when switching network by wall…
Browse files Browse the repository at this point in the history
…etConnect (#315)
  • Loading branch information
devinxl authored Dec 21, 2023
1 parent c272de2 commit cd65afb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function handleWalletError(err: any, args: any, context: unknown) {
});

// Compatible the walletConnect cannot switch network
if (JSON.stringify(err).includes("Cannot set properties of undefined (setting 'defaultChain')")) {
if (JSON.stringify(err).includes("Cannot set properties of undefined (setting 'defaultChain')") || JSON.stringify(err).includes("undefined has no properties")) {
toast.error({
description: 'Sorry, it seems like we lost the connection of your wallet, please login again to continue.'
});
Expand Down

0 comments on commit cd65afb

Please sign in to comment.