From c6dd329230943c57b2569fbf70500088945eea65 Mon Sep 17 00:00:00 2001 From: Polybius93 Date: Mon, 25 Nov 2024 10:54:48 +0100 Subject: [PATCH] feat: add add token button to account menu --- src/app/components/account/components/account-menu.tsx | 4 ++++ src/app/hooks/use-add-token.ts | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/components/account/components/account-menu.tsx b/src/app/components/account/components/account-menu.tsx index 553f7cdb..f2690cf4 100644 --- a/src/app/components/account/components/account-menu.tsx +++ b/src/app/components/account/components/account-menu.tsx @@ -9,6 +9,7 @@ import { Text, useBreakpointValue, } from '@chakra-ui/react'; +import { useAddToken } from '@hooks/use-add-token'; import { XRPWallet } from '@models/wallet'; import { truncateAddress } from 'dlc-btc-lib/utilities'; import { Connector } from 'wagmi'; @@ -24,6 +25,8 @@ export function AccountMenu({ wallet, handleDisconnectWallet, }: AccountMenuProps): React.JSX.Element | false { + const addToken = useAddToken(); + const isMobile = useBreakpointValue({ base: true, md: false }); if (!address) return false; @@ -52,6 +55,7 @@ export function AccountMenu({ + addToken()}>Add Token To Wallet handleDisconnectWallet()}>Disconnect diff --git a/src/app/hooks/use-add-token.ts b/src/app/hooks/use-add-token.ts index c2e26d22..39093a23 100644 --- a/src/app/hooks/use-add-token.ts +++ b/src/app/hooks/use-add-token.ts @@ -20,7 +20,7 @@ export function useAddToken(): () => Promise { type: 'ERC20', options: { address: ethereumNetworkConfiguration.dlcBTCContract.address, - symbol: 'dlcBTC', + symbol: 'iBTC', decimals: 8, image: 'https://dlc-public-assets.s3.amazonaws.com/dlcBTC_Token.png', },