Skip to content

Commit

Permalink
fix: handle exception when symbol is null
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY committed Sep 21, 2023
1 parent bc0727a commit bfdcbd5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/CommonERCTransferlist/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export const fetchERCTransferList = (

const SimpleERC20Transferlist: React.FC<Erc20ResponseProps> = props => {
const { token_transfers: dataSource } = props
const handleTokenName = udt => udt.symbol.split('.')[0] || ''
const handleTokenName = udt => udt.symbol?.split('.')[0] || ''

return <BaseTransferlist {...dataSource} handleTokenName={handleTokenName} type={TransferlistType.Erc20} />
}
Expand Down
2 changes: 1 addition & 1 deletion components/ERC20TransferList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ const TransferList: React.FC<
{isShowLogo ? (
<TokenLogo name={item.udt?.name} logo={item.udt?.icon} />
) : (
item.udt?.symbol.split('.')[0]
item.udt?.symbol?.split('.')[0] ?? ''
)}
</a>
</NextLink>
Expand Down

0 comments on commit bfdcbd5

Please sign in to comment.