Skip to content

Commit

Permalink
evm wallet hook rollback
Browse files Browse the repository at this point in the history
  • Loading branch information
nohaapav committed Jun 12, 2024
1 parent c0eba76 commit 6d97db3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/sections/trade/sections/swap/SwapPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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<SearchGenerics>()
Expand Down Expand Up @@ -117,6 +120,7 @@ export function SwapPage() {
return (
<SContainer>
<SwapApp
key={version}
ref={(r) => {
if (r) {
r.setAttribute("chart", "")
Expand Down

0 comments on commit 6d97db3

Please sign in to comment.