From 68f2a2ec0eef4ce240f57103484898d1e5cbda0f 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 | 11 +++++++++-- packages/wallet/shared/src/types/walletAddress.ts | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/wallet/frontend/src/components/WalletAddressesTable.tsx b/packages/wallet/frontend/src/components/WalletAddressesTable.tsx index 0222363ee..7c374de96 100644 --- a/packages/wallet/frontend/src/components/WalletAddressesTable.tsx +++ b/packages/wallet/frontend/src/components/WalletAddressesTable.tsx @@ -101,6 +101,13 @@ export const CopyWalletAddress = () => { const { walletAddress } = useContext(WalletAddressRowContext) const [isCopied, setIsCopied] = useState(false) + let pointer = walletAddress.url + + if (walletAddress.isCard) { + const url = new URL(walletAddress.url) + pointer = `$ilp.dev${url.pathname}` + } + useEffect(() => { setTimeout(() => { setIsCopied(false) @@ -114,11 +121,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 {