Skip to content

Commit 87f320c

Browse files
committed
revert show all tokens change
1 parent 7c996a7 commit 87f320c

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

src/storage/account.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -263,13 +263,14 @@ export async function queryTokensByAddress(address: string, detail = false): Pro
263263
const accountExist = await queryAccountByAccountId(
264264
contractAddress.slice(2).toLowerCase() + '0'.repeat(24) //Search by Shardus address
265265
)
266-
// Include all tokens, but provide contract info when available
267-
filterTokens.push({
268-
contractAddress: contractAddress,
269-
contractInfo: accountExist?.contractInfo || null,
270-
contractType: accountExist?.contractType || null,
271-
balance: tokenValue,
272-
})
266+
if (accountExist && accountExist.contractType) {
267+
filterTokens.push({
268+
contractAddress: contractAddress,
269+
contractInfo: accountExist?.contractInfo || null,
270+
contractType: accountExist?.contractType || null,
271+
balance: tokenValue,
272+
})
273+
}
273274
}
274275
}
275276
if (config.verbose) console.log('Tokens of an address', tokens)

0 commit comments

Comments
 (0)