Skip to content

Commit

Permalink
use ilp.dev
Browse files Browse the repository at this point in the history
  • Loading branch information
raducristianpopa committed Oct 24, 2024
1 parent 37a9b19 commit 5e4ca08
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/wallet/frontend/src/components/WalletAddressesTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -114,11 +120,11 @@ export const CopyWalletAddress = () => {
onClick={(e) => {
e.preventDefault()
setIsCopied(true)
copyToClipboard(walletAddress.url)
copyToClipboard(pointer)
}}
>
<p className="underline decoration-dashed underline-offset-2">
{walletAddress.url}
{pointer}
</p>
</TooltipTrigger>
<TooltipContent onPointerDownOutside={(e) => e.preventDefault()}>
Expand Down
1 change: 1 addition & 0 deletions packages/wallet/shared/src/types/walletAddress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export interface IWalletAddressResponse {
url: string
publicName: string
accountId: string
isCard?: boolean
}

export interface WalletAddressResponse extends IWalletAddressResponse {
Expand Down

0 comments on commit 5e4ca08

Please sign in to comment.