Skip to content

Commit

Permalink
fix: handle exception of null type hash
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY committed Sep 22, 2024
1 parent bb1ac1e commit 46cffd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/Transaction/TransactionCell/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ 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 46cffd9

Please sign in to comment.