From a698461243fe8f99639749fce6e58719ae8520f2 Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Thu, 6 Mar 2025 21:16:51 +0800 Subject: [PATCH] fix: borked "Copy Address" toast on mobile viewports (#8954) fix: omit middle part of address in the toast Co-authored-by: gomes <17035424+gomesalexandre@users.noreply.github.com> --- src/components/Modals/Receive/ReceiveInfo.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Modals/Receive/ReceiveInfo.tsx b/src/components/Modals/Receive/ReceiveInfo.tsx index aee1ed79430..fa98137247c 100644 --- a/src/components/Modals/Receive/ReceiveInfo.tsx +++ b/src/components/Modals/Receive/ReceiveInfo.tsx @@ -41,6 +41,7 @@ import { Text } from '@/components/Text' import type { TextPropTypes } from '@/components/Text/Text' import { getChainAdapterManager } from '@/context/PluginProvider/chainAdapterSingleton' import { useWallet } from '@/hooks/useWallet/useWallet' +import { firstFourLastFour } from '@/lib/utils' import { selectPortfolioAccountMetadataByAccountId } from '@/state/slices/selectors' import { useAppSelector } from '@/state/store' @@ -138,7 +139,7 @@ export const ReceiveInfo = ({ asset, accountId }: ReceivePropsType) => { await navigator.clipboard.writeText(receiveAddress) const title = translate('modals.receive.copied', translatePayload) const status = 'success' - const description = receiveAddress + const description = firstFourLastFour(receiveAddress) toast({ description, title, status, ...toastPayload }) } catch (e) { const title = translate('modals.receive.copyFailed', translatePayload)