mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-12-17 09:34:16 -05:00
fix(gui): simplify wallet seedphrase dialog open button
This commit is contained in:
parent
65a46a4205
commit
706aaf1fe7
2 changed files with 65 additions and 73 deletions
|
|
@ -19,35 +19,25 @@ export default function SeedPhraseButton({
|
||||||
onMenuClose,
|
onMenuClose,
|
||||||
onSeedPhraseSuccess,
|
onSeedPhraseSuccess,
|
||||||
}: SeedPhraseButtonProps) {
|
}: SeedPhraseButtonProps) {
|
||||||
const handleSeedPhraseSuccess = (
|
|
||||||
response: [GetMoneroSeedResponse, GetRestoreHeightResponse],
|
|
||||||
) => {
|
|
||||||
onSeedPhraseSuccess(response);
|
|
||||||
onMenuClose();
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MenuItem component="div">
|
|
||||||
<PromiseInvokeButton
|
<PromiseInvokeButton
|
||||||
onInvoke={getMoneroSeedAndRestoreHeight}
|
onInvoke={getMoneroSeedAndRestoreHeight}
|
||||||
onSuccess={handleSeedPhraseSuccess}
|
onSuccess={onSeedPhraseSuccess}
|
||||||
displayErrorSnackbar={true}
|
displayErrorSnackbar={true}
|
||||||
variant="text"
|
|
||||||
contextRequirement={isContextWithMoneroWallet}
|
contextRequirement={isContextWithMoneroWallet}
|
||||||
|
component={MenuItem}
|
||||||
|
disableRipple={false}
|
||||||
sx={{
|
sx={{
|
||||||
justifyContent: "flex-start",
|
|
||||||
textTransform: "none",
|
textTransform: "none",
|
||||||
padding: 0,
|
|
||||||
minHeight: "auto",
|
|
||||||
width: "100%",
|
width: "100%",
|
||||||
color: "text.primary",
|
borderRadius: "0px",
|
||||||
}}
|
}}
|
||||||
|
color="inherit"
|
||||||
>
|
>
|
||||||
<ListItemIcon>
|
<ListItemIcon>
|
||||||
<KeyIcon />
|
<KeyIcon />
|
||||||
</ListItemIcon>
|
</ListItemIcon>
|
||||||
<Typography>Seedphrase</Typography>
|
<Typography>Seedphrase</Typography>
|
||||||
</PromiseInvokeButton>
|
</PromiseInvokeButton>
|
||||||
</MenuItem>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -72,12 +72,12 @@ export default function WalletActionButtons({
|
||||||
open={sendDialogOpen}
|
open={sendDialogOpen}
|
||||||
onClose={() => setSendDialogOpen(false)}
|
onClose={() => setSendDialogOpen(false)}
|
||||||
/>
|
/>
|
||||||
|
<Box sx={{ display: "flex", justifyContent: "space-between" }}>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
flexWrap: "wrap",
|
flexWrap: "wrap",
|
||||||
gap: 1,
|
gap: 1,
|
||||||
mb: 2,
|
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
@ -96,7 +96,8 @@ export default function WalletActionButtons({
|
||||||
clickable
|
clickable
|
||||||
/>
|
/>
|
||||||
<DfxButton />
|
<DfxButton />
|
||||||
|
</Box>
|
||||||
|
<Box>
|
||||||
<IconButton onClick={handleMenuClick}>
|
<IconButton onClick={handleMenuClick}>
|
||||||
<MoreHorizIcon />
|
<MoreHorizIcon />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
|
|
@ -118,6 +119,7 @@ export default function WalletActionButtons({
|
||||||
/>
|
/>
|
||||||
</Menu>
|
</Menu>
|
||||||
</Box>
|
</Box>
|
||||||
|
</Box>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue