From bfdcbd5d8bb7f8c1e76c1e79a243a5f37055e731 Mon Sep 17 00:00:00 2001 From: Keith Date: Thu, 21 Sep 2023 11:56:49 +0900 Subject: [PATCH] fix: handle exception when symbol is null --- components/CommonERCTransferlist/index.tsx | 2 +- components/ERC20TransferList/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/CommonERCTransferlist/index.tsx b/components/CommonERCTransferlist/index.tsx index f328d2d31..f095b6aae 100644 --- a/components/CommonERCTransferlist/index.tsx +++ b/components/CommonERCTransferlist/index.tsx @@ -108,7 +108,7 @@ export const fetchERCTransferList = ( const SimpleERC20Transferlist: React.FC = props => { const { token_transfers: dataSource } = props - const handleTokenName = udt => udt.symbol.split('.')[0] || '' + const handleTokenName = udt => udt.symbol?.split('.')[0] || '' return } diff --git a/components/ERC20TransferList/index.tsx b/components/ERC20TransferList/index.tsx index 963de13c9..13de547d5 100644 --- a/components/ERC20TransferList/index.tsx +++ b/components/ERC20TransferList/index.tsx @@ -341,7 +341,7 @@ const TransferList: React.FC< {isShowLogo ? ( ) : ( - item.udt?.symbol.split('.')[0] + item.udt?.symbol?.split('.')[0] ?? '' )}