diff --git a/src/pages/Address/BTCAddressComp.tsx b/src/pages/Address/BTCAddressComp.tsx index 019fc8270..157eca617 100644 --- a/src/pages/Address/BTCAddressComp.tsx +++ b/src/pages/Address/BTCAddressComp.tsx @@ -25,11 +25,16 @@ export const BTCAddressOverviewCard: FC<{ address: Address }> = ({ address }) => ) const { boundLiveCellsCount, unboundLiveCellsCount } = data || { boundLiveCellsCount: 0, unboundLiveCellsCount: 0 } - let { data: udtAccounts } = useQuery(['bitcoin address udt accounts', address], async () => { - const data = await explorerService.api.fetchUDTAccountsByBtcAddress(address.bitcoinAddressHash || '') - return data.udtAccounts - }) - udtAccounts = udtAccounts || [] + const { data: udtAccounts } = useQuery( + ['bitcoin address udt accounts', address], + async () => { + const data = await explorerService.api.fetchUDTAccountsByBtcAddress(address.bitcoinAddressHash || '') + return data.udtAccounts + }, + { + initialData: [], + }, + ) const [udts, inscriptions] = udtAccounts.reduce( (acc, cur) => {