From 751ed1fb54e0baccf3c67fd088041f8655d8cc76 Mon Sep 17 00:00:00 2001 From: ekanem david Date: Tue, 14 Jan 2025 17:56:10 +0000 Subject: [PATCH] Remove aptos wallets --- src/components/WalletModal.tsx | 102 +++++++++++---------------------- 1 file changed, 35 insertions(+), 67 deletions(-) diff --git a/src/components/WalletModal.tsx b/src/components/WalletModal.tsx index 95408d472..77cb87aa0 100644 --- a/src/components/WalletModal.tsx +++ b/src/components/WalletModal.tsx @@ -1,6 +1,5 @@ import { AnyAptosWallet, - AptosPrivacyPolicy, WalletItem, getAptosConnectWallets, isInstallRequired, @@ -11,9 +10,7 @@ import { Box, Breakpoint, Button, - Collapse, Dialog, - Divider, IconButton, ListItem, ListItemText, @@ -21,18 +18,12 @@ import { Typography, useTheme, } from "@mui/material"; -import { grey } from "../themes/colors/aptosColorPalette"; +import {grey} from "../themes/colors/aptosColorPalette"; // reported bug with loading mui icons with esm, therefore need to import like this https://github.com/mui/material-ui/issues/35233 -import { - Close as CloseIcon, - ExpandMore, - LanOutlined as LanOutlinedIcon, -} from "@mui/icons-material"; -import { useState } from "react"; +import {Close as CloseIcon} from "@mui/icons-material"; import {WalletConnectorProps} from "@aptos-labs/wallet-adapter-mui-design"; - interface WalletsModalProps extends Pick< WalletConnectorProps, @@ -46,41 +37,35 @@ interface WalletsModalProps export default function WalletsModal({ handleClose, modalOpen, - networkSupport, - sortDefaultWallets, sortMoreWallets, maxWidth, }: WalletsModalProps): JSX.Element { const theme = useTheme(); - const [expanded, setExpanded] = useState(false); - const { wallets = [] } = useWallet(); + const {wallets = []} = useWallet(); const { /** Wallets that use social login to create an account on the blockchain */ - aptosConnectWallets, /** Wallets that use traditional wallet extensions */ otherWallets, } = getAptosConnectWallets(wallets); const { /** Wallets that are currently installed or loadable. */ - defaultWallets, + // defaultWallets, /** Wallets that are NOT currently installed or loadable. */ moreWallets, } = partitionWallets(otherWallets); - if (sortDefaultWallets) defaultWallets.sort(sortDefaultWallets); + // if (sortDefaultWallets) defaultWallets.sort(sortDefaultWallets); if (sortMoreWallets) moreWallets.sort(sortMoreWallets); - const hasAptosConnectWallets = !!aptosConnectWallets.length; - return ( @@ -193,35 +178,18 @@ export default function WalletsModal({ Or )}*/} - - {defaultWallets.map((wallet) => ( - - ))} + {!!moreWallets.length && ( <> - - - - {moreWallets.map((wallet) => ( - - ))} - - + + {moreWallets.map((wallet) => ( + + ))} + )} @@ -235,7 +203,7 @@ interface WalletRowProps { onConnect?: () => void; } -function WalletRow({ wallet, onConnect }: WalletRowProps) { +function WalletRow({wallet, onConnect}: WalletRowProps) { const theme = useTheme(); return ( @@ -253,10 +221,10 @@ function WalletRow({ wallet, onConnect }: WalletRowProps) { borderRadius: `${theme.shape.borderRadius}px`, }} > - + {isInstallRequired(wallet) ? ( @@ -285,19 +253,19 @@ function WalletRow({ wallet, onConnect }: WalletRowProps) { ); } -function AptosConnectWalletRow({ wallet, onConnect }: WalletRowProps) { - return ( - - - - - - ); -} \ No newline at end of file +// function AptosConnectWalletRow({wallet, onConnect}: WalletRowProps) { +// return ( +// +// +// +// +// +// ); +// }