Skip to content

Commit

Permalink
fix: switchNetwork
Browse files Browse the repository at this point in the history
  • Loading branch information
irisdv committed Nov 29, 2024
1 parent d4c67ee commit 4861997
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/UI/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,11 @@ const Navbar: FunctionComponent = () => {
}

const switchNetwork = async () => {
if (isArgentWallet(connector)) disconnectByClick();
else {
if (isArgentWallet(connector)) {
const res = await switchChainAsync();
if (res) setIsWrongNetwork(false);
} else {
disconnectByClick();
}
};

Expand Down

0 comments on commit 4861997

Please sign in to comment.