connection to unknwon network from metamask fixed
Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
parent
3ad84a886e
commit
a5306a68a7
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "ghost-dao-interface",
|
||||
"private": true,
|
||||
"version": "0.7.51",
|
||||
"version": "0.7.52",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@ -115,7 +115,9 @@ function InitialWalletView({ isWalletOpen, address, chainId, onClose }) {
|
||||
const { chains } = useSwitchChain();
|
||||
|
||||
const chainName = useMemo(() => {
|
||||
return chains.find(chain => chain.id === chainId).name.toLowerCase();
|
||||
const chain = chains.find(chain => chain.id === chainId)
|
||||
if (!chain) return null
|
||||
return chain.name.toLowerCase()
|
||||
}, [chains, chainId])
|
||||
|
||||
const onBtnClick = (dexName, from, to) => {
|
||||
@ -131,7 +133,7 @@ function InitialWalletView({ isWalletOpen, address, chainId, onClose }) {
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (isWalletOpen) {
|
||||
if (isWalletOpen && chainName) {
|
||||
ReactGA.send({ hitType: "pageview", page: `/${chainName.toLowerCase()}/sidebar` });
|
||||
}
|
||||
}, [isWalletOpen, chainName])
|
||||
|
||||
Loading…
Reference in New Issue
Block a user