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",
|
"name": "ghost-dao-interface",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.7.51",
|
"version": "0.7.52",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@ -115,7 +115,9 @@ function InitialWalletView({ isWalletOpen, address, chainId, onClose }) {
|
|||||||
const { chains } = useSwitchChain();
|
const { chains } = useSwitchChain();
|
||||||
|
|
||||||
const chainName = useMemo(() => {
|
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])
|
}, [chains, chainId])
|
||||||
|
|
||||||
const onBtnClick = (dexName, from, to) => {
|
const onBtnClick = (dexName, from, to) => {
|
||||||
@ -131,7 +133,7 @@ function InitialWalletView({ isWalletOpen, address, chainId, onClose }) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isWalletOpen) {
|
if (isWalletOpen && chainName) {
|
||||||
ReactGA.send({ hitType: "pageview", page: `/${chainName.toLowerCase()}/sidebar` });
|
ReactGA.send({ hitType: "pageview", page: `/${chainName.toLowerCase()}/sidebar` });
|
||||||
}
|
}
|
||||||
}, [isWalletOpen, chainName])
|
}, [isWalletOpen, chainName])
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user