diff --git a/src/config.ts b/src/config.ts index 7b53802..df52ee3 100644 --- a/src/config.ts +++ b/src/config.ts @@ -18,6 +18,7 @@ export const config = { } as Record, DEFAULT_CHAIN: import.meta.env.VITE_DEFAULT_CHAIN as SUPPORTED_CHAINS, ROBOTORNOT_LINK: import.meta.env.VITE_ROBOTORNOT_LINK, + OTHER_BROWSER_METAMASK_LINK: 'https://metamask.io/download/', CHROME_METAMASK_ADDON_LINK: 'https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn', FIREFOX_METAMASK_ADDON_LINK: diff --git a/src/pages/SignInPage/SignInPage.tsx b/src/pages/SignInPage/SignInPage.tsx index d5312fe..39ab427 100644 --- a/src/pages/SignInPage/SignInPage.tsx +++ b/src/pages/SignInPage/SignInPage.tsx @@ -10,7 +10,6 @@ import { useNavigate } from 'react-router-dom' import { AppButton, Icon } from '@/common' import { useMetamaskZkpSnapContext, useWeb3Context } from '@/contexts' import { IconNames, RoutesPaths } from '@/enums' -// import { bus, BUS_EVENTS } from '@/helpers' const SignInPage = () => { const [isPending, setIsPending] = useState(false) @@ -55,17 +54,13 @@ const SignInPage = () => { const currentBrowser = chromeAgent || firefoxAgent || operaAgent || '' - if (!currentBrowser) return '' + if (!currentBrowser) return config.OTHER_BROWSER_METAMASK_LINK return get(browserExtensionsLinks, currentBrowser, '') }, [isMetamaskInstalled]) const openInstallMetamaskLink = useCallback(() => { - if (!installMMLink) { - // bus.emit(BUS_EVENTS.warning, `Your browser is not support Metamask`) - - return - } + if (!installMMLink) return setIsPending(true)