Commit ad766958 authored by isstuev's avatar isstuev

type fixes

parent a9cbaf92
...@@ -120,7 +120,7 @@ const TokenPageContent = () => { ...@@ -120,7 +120,7 @@ const TokenPageContent = () => {
}, [ tokenQuery.data, tokenQuery.isPlaceholderData ]); }, [ tokenQuery.data, tokenQuery.isPlaceholderData ]);
const hasData = (tokenQuery.data && !tokenQuery.isPlaceholderData) && (contractQuery.data && !contractQuery.isPlaceholderData); const hasData = (tokenQuery.data && !tokenQuery.isPlaceholderData) && (contractQuery.data && !contractQuery.isPlaceholderData);
const hasInventoryTab = Boolean(tokenQuery.data?.type) && NFT_TOKEN_TYPE_IDS.includes(tokenQuery.data.type); const hasInventoryTab = tokenQuery.data?.type && NFT_TOKEN_TYPE_IDS.includes(tokenQuery.data.type);
const transfersQuery = useQueryWithPages({ const transfersQuery = useQueryWithPages({
resourceName: 'token_transfers', resourceName: 'token_transfers',
......
...@@ -35,7 +35,7 @@ const TokenTransferListItem = ({ ...@@ -35,7 +35,7 @@ const TokenTransferListItem = ({
isLoading, isLoading,
}: Props) => { }: Props) => {
const timeAgo = useTimeAgoIncrement(timestamp, enableTimeIncrement); const timeAgo = useTimeAgoIncrement(timestamp, enableTimeIncrement);
const { usd, valueStr } = 'value' in total ? getCurrencyValue({ const { usd, valueStr } = 'value' in total && total.value !== null ? getCurrencyValue({
value: total.value, value: total.value,
exchangeRate: token.exchange_rate, exchangeRate: token.exchange_rate,
accuracy: 8, accuracy: 8,
......
...@@ -34,7 +34,7 @@ const TokenTransferTableItem = ({ ...@@ -34,7 +34,7 @@ const TokenTransferTableItem = ({
isLoading, isLoading,
}: Props) => { }: Props) => {
const timeAgo = useTimeAgoIncrement(timestamp, enableTimeIncrement); const timeAgo = useTimeAgoIncrement(timestamp, enableTimeIncrement);
const { usd, valueStr } = 'value' in total ? getCurrencyValue({ const { usd, valueStr } = 'value' in total && total.value !== null ? getCurrencyValue({
value: total.value, value: total.value,
exchangeRate: token.exchange_rate, exchangeRate: token.exchange_rate,
accuracy: 8, accuracy: 8,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment