Skip to content

Commit

Permalink
ux: Add warning message when metamask is not detected in burner walle…
Browse files Browse the repository at this point in the history
…t flow
  • Loading branch information
wryonik committed Oct 11, 2024
1 parent 9ff0f61 commit abbac01
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const StepsContext = createContext(null);

function App() {
const [step, setStep] = useState(STEPS.STEP_SELECTION);

return (
<AppContextProvider>
<ThemeProvider theme={theme}>
Expand All @@ -30,7 +30,8 @@ function App() {
<Web3Provider>
<BrowserRouter>
<NavBar />
<Grid container
<Grid
container
style={{ padding: 16, height: "calc(100vh - 70px - 32px)" }}
justifyContent={"center"}
alignItems={"center"}
Expand Down
6 changes: 6 additions & 0 deletions src/pages/landingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ const LandingPage = () => {
return navigate("/safe-wallet");
case "BURNER_WALLET":
toast("Please disconnect previously created wallet");
if (!!window?.ethereum?.isMetaMask === false) {
toast.error(
"It appears that the Metamask extension is not installed. To ensure the website functions correctly, please install Metamask before proceeding.",
{ duration: 5000000 }
);
}
return navigate("/burner-wallet");
case "WALLET_RECOVERY":
return navigate("/wallet-recovery");
Expand Down

0 comments on commit abbac01

Please sign in to comment.