From 19e1082928db1e3e4e6c875c43ced3f8de64f66c Mon Sep 17 00:00:00 2001 From: JP Angelle Date: Wed, 4 Oct 2023 12:45:49 -0500 Subject: [PATCH] handle for evm address --- centrifuge-app/src/components/Portfolio/Transactions.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/centrifuge-app/src/components/Portfolio/Transactions.tsx b/centrifuge-app/src/components/Portfolio/Transactions.tsx index 3f83842cf3..7fa8831cc1 100644 --- a/centrifuge-app/src/components/Portfolio/Transactions.tsx +++ b/centrifuge-app/src/components/Portfolio/Transactions.tsx @@ -7,7 +7,7 @@ import { } from '@centrifuge/centrifuge-js' import { formatBalance, useCentrifugeUtils } from '@centrifuge/centrifuge-react' import { Box, Grid, IconExternalLink, Stack, Text } from '@centrifuge/fabric' -import * as React from 'react' +import { isAddress as isValidEVMAddress } from '@ethersproject/address' import { Link } from 'react-router-dom' import { formatDate } from '../../utils/date' import { useAddress } from '../../utils/useAddress' @@ -66,7 +66,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[] = []