From f03accb3a028d675850c32bcc4dd74a105e5eb10 Mon Sep 17 00:00:00 2001 From: isstuev Date: Thu, 7 Nov 2024 17:19:36 +0100 Subject: [PATCH] token transfer total is possibly null --- ui/shared/TokenTransfer/TokenTransferListItem.tsx | 2 +- ui/shared/TokenTransfer/TokenTransferTableItem.tsx | 2 +- ui/token/TokenTransfer/TokenTransferListItem.tsx | 2 +- ui/token/TokenTransfer/TokenTransferTableItem.tsx | 2 +- ui/tokenTransfers/TokenTransfersListItem.tsx | 2 +- ui/tokenTransfers/TokenTransfersTableItem.tsx | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/shared/TokenTransfer/TokenTransferListItem.tsx b/ui/shared/TokenTransfer/TokenTransferListItem.tsx index cc0907c827..6a0004d7da 100644 --- a/ui/shared/TokenTransfer/TokenTransferListItem.tsx +++ b/ui/shared/TokenTransfer/TokenTransferListItem.tsx @@ -62,7 +62,7 @@ const TokenTransferListItem = ({ ) } - { 'token_id' in total && total.token_id !== null && } + { total && 'token_id' in total && total.token_id !== null && } { showTxInfo && txHash && ( - { 'token_id' in total && total.token_id !== null && } + { total && 'token_id' in total && total.token_id !== null && } { showTxInfo && txHash && ( diff --git a/ui/token/TokenTransfer/TokenTransferListItem.tsx b/ui/token/TokenTransfer/TokenTransferListItem.tsx index 26cb384bee..309bf96646 100644 --- a/ui/token/TokenTransfer/TokenTransferListItem.tsx +++ b/ui/token/TokenTransfer/TokenTransferListItem.tsx @@ -89,7 +89,7 @@ const TokenTransferListItem = ({ ) } ) } - { 'token_id' in total && (NFT_TOKEN_TYPE_IDS.includes(token.type)) && total.token_id !== null && ( + { total && 'token_id' in total && (NFT_TOKEN_TYPE_IDS.includes(token.type)) && total.token_id !== null && ( { (NFT_TOKEN_TYPE_IDS.includes(token.type)) && ( - { 'token_id' in total && total.token_id !== null ? ( + { total && 'token_id' in total && total.token_id !== null ? ( { - { 'token_id' in item.total && (NFT_TOKEN_TYPE_IDS.includes(item.token.type)) && item.total.token_id !== null && ( + { item.total && 'token_id' in item.total && (NFT_TOKEN_TYPE_IDS.includes(item.token.type)) && item.total.token_id !== null && ( <> Token ID diff --git a/ui/tokenTransfers/TokenTransfersTableItem.tsx b/ui/tokenTransfers/TokenTransfersTableItem.tsx index b7aaaf1b41..34cb214d2e 100644 --- a/ui/tokenTransfers/TokenTransfersTableItem.tsx +++ b/ui/tokenTransfers/TokenTransfersTableItem.tsx @@ -62,7 +62,7 @@ const TokenTransferTableItem = ({ item, isLoading }: Props) => { /> - { 'token_id' in item.total && (NFT_TOKEN_TYPE_IDS.includes(item.token.type)) && item.total.token_id !== null ? ( + { item.total && 'token_id' in item.total && (NFT_TOKEN_TYPE_IDS.includes(item.token.type)) && item.total.token_id !== null ? (