Skip to content

Commit

Permalink
fix: read value of undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
guanbinrui committed Sep 21, 2021
1 parent e010f40 commit ae38179
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ const useStyles = makeStyles()({
})

export const Row: FC<Props> = ({ transaction, chainId }) => {
const { classes: styles } = useStyles()
const { t } = useI18N()
const { classes: styles } = useStyles()
const chainDetailed = useChainDetailed()
return (
<TableRow component="div" className={classNames({ [styles.failed]: transaction.failed })}>
Expand Down Expand Up @@ -58,13 +58,13 @@ export const Row: FC<Props> = ({ transaction, chainId }) => {
{t('gas_fee')}
</Typography>
<Typography className={classNames({ [styles.hidden]: isNil(transaction.gasFee) })} variant="body2">
{transaction.gasFee?.eth.toFixed(4)} {chainDetailed?.nativeCurrency.symbol}
{transaction.gasFee?.eth?.toFixed(4)} {chainDetailed?.nativeCurrency.symbol}
</Typography>
<Typography
className={classNames({ [styles.hidden]: isNil(transaction.gasFee) })}
color="textSecondary"
variant="body2">
{transaction.gasFee?.usd.toFixed(2)} USD
{transaction.gasFee?.usd?.toFixed(2)} USD
</Typography>
</TableCell>
</TableRow>
Expand Down

0 comments on commit ae38179

Please sign in to comment.