Skip to content

Commit

Permalink
fix(dapp): bug when rejecting network switch
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudobun committed May 7, 2024
1 parent a469147 commit 1b7df74
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/dapp/src/components/MascaProvider/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,12 @@ const MascaProvider = ({ children }: { children: React.ReactNode }) => {
loading: false,
link: null,
});
await switchChainAsync({ chainId: 1 });
await enableMascaHandler();
await switchChainAsync({ chainId: 1 }).catch((err) => {
console.log(err);
});
await enableMascaHandler().catch((err) => {
console.log(err);
});
return;
}
setTimeout(() => {
Expand Down

0 comments on commit 1b7df74

Please sign in to comment.