From 05ca4b99bcb8d14aa94534f214f37851d03ccfe6 Mon Sep 17 00:00:00 2001 From: JP Date: Thu, 26 Oct 2023 09:42:23 -0500 Subject: [PATCH] fix: fix trx bug (#1667) --- centrifuge-app/src/components/Portfolio/Transactions.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/centrifuge-app/src/components/Portfolio/Transactions.tsx b/centrifuge-app/src/components/Portfolio/Transactions.tsx index 3f83842cf3..bde88a195c 100644 --- a/centrifuge-app/src/components/Portfolio/Transactions.tsx +++ b/centrifuge-app/src/components/Portfolio/Transactions.tsx @@ -7,6 +7,7 @@ import { } from '@centrifuge/centrifuge-js' import { formatBalance, useCentrifugeUtils } from '@centrifuge/centrifuge-react' import { Box, Grid, IconExternalLink, Stack, Text } from '@centrifuge/fabric' +import { isAddress as isValidEVMAddress } from '@ethersproject/address' import * as React from 'react' import { Link } from 'react-router-dom' import { formatDate } from '../../utils/date' @@ -66,7 +67,7 @@ const formatters = { export function Transactions({ count }: AddressTransactionsProps) { const { formatAddress } = useCentrifugeUtils() const address = useAddress() - const formattedAddress = formatAddress(address || '') + const formattedAddress = address && isValidEVMAddress(address) ? address : formatAddress(address || '') const allTransactions = useAllTransactions(formattedAddress) const formattedTransactions: TransactionCardProps[] = []