From 48619970f76ea15388ece518e928eeb457de3baf Mon Sep 17 00:00:00 2001 From: Iris Date: Fri, 29 Nov 2024 11:37:21 +0100 Subject: [PATCH] fix: switchNetwork --- components/UI/navbar.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/UI/navbar.tsx b/components/UI/navbar.tsx index 2dec4532..45cc4945 100644 --- a/components/UI/navbar.tsx +++ b/components/UI/navbar.tsx @@ -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(); } };