-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(finance): add helper component for MetaMask guidance
- Introduced `FinanceMetamaskHelper` to guide users without MetaMask. - Updated `finance-withdraw-from-metamask.tsx` to render helper alongside the button. - Updated `finance-deposit-from-metamask.tsx` similarly to include the helper. - Adjusted margin styling in `FinanceMetamaskButton` for consistency.
- Loading branch information
Showing
4 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
src/sections/finance/components/finance-metamask-helper.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import Stack from "@mui/material/Stack"; | ||
import {Box} from "@mui/system"; | ||
import Typography from "@mui/material/Typography"; | ||
import Button from "@mui/material/Button"; | ||
|
||
const FinanceMetamaskHelper = () => { | ||
|
||
const handleDownloadMetaMask = () => { | ||
window.location.href = 'https://metamask.app.link'; | ||
} | ||
|
||
return ( | ||
<Stack sx={{ | ||
borderRadius: 1, | ||
border: '1px solid rgba(145, 158, 171, 0.32)', | ||
margin: '0 1em 1em 1em', | ||
}}> | ||
<Box justifyContent={'space-between'} sx={{ | ||
justifyContent: 'space-between', | ||
flexDirection: 'column', | ||
textAlign: 'center', | ||
display:'flex', | ||
p: 2, | ||
borderRadius: 1 }}> | ||
<Typography variant={'h4'} color={'text.secondary'}>MetaMask Wallet Required</Typography> | ||
<Typography sx={{mt:1}} variant={'body2'} color={'text.secondary'}> | ||
To use this feature, you need to have the MetaMask wallet installed. | ||
If you don't have it, you can download it from the official website. | ||
</Typography> | ||
|
||
<Button onClick={handleDownloadMetaMask} sx={{marginTop: 2, width:'auto',}} variant={'contained'} color={'primary'}> | ||
Download MetaMask | ||
</Button> | ||
</Box> | ||
</Stack> | ||
) | ||
} | ||
|
||
export default FinanceMetamaskHelper; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters