From ac73ba2b8458d9229fc2c04535478a3bd1380915 Mon Sep 17 00:00:00 2001 From: nikitabelous Date: Tue, 12 Dec 2023 17:15:01 +0200 Subject: [PATCH 1/2] feat add metamsak link at other browsers --- src/config.ts | 1 + src/pages/SignInPage/SignInPage.tsx | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) 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..3d7b0b6 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,7 +54,7 @@ const SignInPage = () => { const currentBrowser = chromeAgent || firefoxAgent || operaAgent || '' - if (!currentBrowser) return '' + if (!currentBrowser) return config.OTHER_BROWSER_METAMASK_LINK return get(browserExtensionsLinks, currentBrowser, '') }, [isMetamaskInstalled]) From ef330a993e51645f55f79cc963389dd50930a88a Mon Sep 17 00:00:00 2001 From: nikitabelous Date: Tue, 12 Dec 2023 17:20:48 +0200 Subject: [PATCH 2/2] remove comment --- src/pages/SignInPage/SignInPage.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/pages/SignInPage/SignInPage.tsx b/src/pages/SignInPage/SignInPage.tsx index 3d7b0b6..39ab427 100644 --- a/src/pages/SignInPage/SignInPage.tsx +++ b/src/pages/SignInPage/SignInPage.tsx @@ -60,11 +60,7 @@ const SignInPage = () => { }, [isMetamaskInstalled]) const openInstallMetamaskLink = useCallback(() => { - if (!installMMLink) { - // bus.emit(BUS_EVENTS.warning, `Your browser is not support Metamask`) - - return - } + if (!installMMLink) return setIsPending(true)