From 5e4ca08d4d515c7e12c4ac64b4dcdf72ba2c9226 Mon Sep 17 00:00:00 2001 From: Radu-Cristian Popa Date: Thu, 24 Oct 2024 23:54:10 +0200 Subject: [PATCH] use ilp.dev --- .../frontend/src/components/WalletAddressesTable.tsx | 10 ++++++++-- packages/wallet/shared/src/types/walletAddress.ts | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/wallet/frontend/src/components/WalletAddressesTable.tsx b/packages/wallet/frontend/src/components/WalletAddressesTable.tsx index 0222363ee..b946ffcb9 100644 --- a/packages/wallet/frontend/src/components/WalletAddressesTable.tsx +++ b/packages/wallet/frontend/src/components/WalletAddressesTable.tsx @@ -101,6 +101,12 @@ export const CopyWalletAddress = () => { const { walletAddress } = useContext(WalletAddressRowContext) const [isCopied, setIsCopied] = useState(false) + let pointer = walletAddress.url + + if (walletAddress.isCard) { + pointer = `$ilp.dev/${pointer.split('/')[1]}` + } + useEffect(() => { setTimeout(() => { setIsCopied(false) @@ -114,11 +120,11 @@ export const CopyWalletAddress = () => { onClick={(e) => { e.preventDefault() setIsCopied(true) - copyToClipboard(walletAddress.url) + copyToClipboard(pointer) }} >

- {walletAddress.url} + {pointer}

e.preventDefault()}> diff --git a/packages/wallet/shared/src/types/walletAddress.ts b/packages/wallet/shared/src/types/walletAddress.ts index eef02d0d4..8ecc2b1d7 100644 --- a/packages/wallet/shared/src/types/walletAddress.ts +++ b/packages/wallet/shared/src/types/walletAddress.ts @@ -6,6 +6,7 @@ export interface IWalletAddressResponse { url: string publicName: string accountId: string + isCard?: boolean } export interface WalletAddressResponse extends IWalletAddressResponse {