Skip to content

Commit 93b73d7

Browse files
committed
fix: erc20 discovery balance
1 parent 3dd8658 commit 93b73d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

javascript/tokenscript-viewer/src/integration/discoveryAdapter.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,9 @@ export class DiscoveryAdapter implements ITokenDiscoveryAdapter {
173173
// Rework so collection data API isn't required for erc20
174174
} else if (tokenData.length > 0) {
175175
token.name = tokenData[0].title;
176-
token.balance = tokenData[0].data?.balance ? BigInt(tokenData[0].data?.balance) : 0;
176+
token.balance = tokenData[0].balance ? BigInt(tokenData[0].balance) : 0;
177177
token.symbol = tokenData[0].symbol;
178-
token.decimals = tokenData[0].data?.decimals;
178+
token.decimals = tokenData[0].decimals;
179179
} else {
180180
token.name = collectionData.title;
181181
token.balance = 0;

0 commit comments

Comments
 (0)