Skip to content

Commit

Permalink
fix: fix missing optional chaining
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY committed Sep 23, 2024
1 parent ee18ca0 commit f5f4f1b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/Transaction/TransactionCell/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,9 @@ const TransactionCellCapacityAmount = ({ cell }: { cell: Cell }) => {
return <span>{`${parseUDTAmount(amount, udtInfo.decimal)} ${udtInfo.symbol}`}</span>
}

return <span>{`${t('udt.unknown_token')} #${udtInfo.typeHash.substring(udtInfo.typeHash.length - 4) ?? '?'}`}</span>
return (
<span>{`${t('udt.unknown_token')} #${udtInfo.typeHash?.substring(udtInfo.typeHash.length - 4) ?? '?'}`}</span>
)
}

return <Capacity capacity={shannonToCkb(cell.capacity)} layout="responsive" />
Expand Down

0 comments on commit f5f4f1b

Please sign in to comment.