From 6d97db35e672449bb85cc95e19b09a609fd35f8a Mon Sep 17 00:00:00 2001 From: Pavol Noha Date: Wed, 12 Jun 2024 10:11:54 +0200 Subject: [PATCH] evm wallet hook rollback --- src/sections/trade/sections/swap/SwapPage.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sections/trade/sections/swap/SwapPage.tsx b/src/sections/trade/sections/swap/SwapPage.tsx index de8d273dd..268d6ee4b 100644 --- a/src/sections/trade/sections/swap/SwapPage.tsx +++ b/src/sections/trade/sections/swap/SwapPage.tsx @@ -14,6 +14,7 @@ import { useAccount } from "sections/web3-connect/Web3Connect.utils" import { useDisplayAssetStore } from "utils/displayAsset" import { isEvmAccount } from "utils/evm" import { NATIVE_ASSET_ID } from "utils/api" +import { useRemount } from "hooks/useRemount" import { ExternalAssetImportModal } from "sections/trade/modal/ExternalAssetImportModal" import { AddTokenModal } from "sections/wallet/addToken/modal/AddTokenModal" import { useState } from "react" @@ -61,6 +62,8 @@ export function SwapPage() { const [addToken, setAddToken] = useState(false) const isEvm = isEvmAccount(account?.address) + const version = useRemount([isEvm]) + const rpcUrl = preference.rpcUrl ?? import.meta.env.VITE_PROVIDER_URL const rawSearch = useSearch() @@ -117,6 +120,7 @@ export function SwapPage() { return ( { if (r) { r.setAttribute("chart", "")