Skip to content

Commit 1f9b2f0

Browse files
committed
fix: additional token loading conditions
1 parent 9df29d7 commit 1f9b2f0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ export class DiscoveryAdapter implements ITokenDiscoveryAdapter {
3939
const walletAddress = await this.getCurrentWalletAddress();
4040
const params = getTokenUrlParams(null, false);
4141

42+
console.log("PARAMS: ", params);
43+
4244
for (const initToken of initialTokenDetails){
4345

4446
try {
@@ -50,12 +52,13 @@ export class DiscoveryAdapter implements ITokenDiscoveryAdapter {
5052
}
5153

5254
if (
55+
params.tokenId &&
5356
cachedToken.tokenType !== "erc20" &&
5457
(
5558
params.originId === cachedToken.originId ||
5659
(
5760
params.contract &&
58-
params.tokenId && params.contract.toLowerCase() === cachedToken.contractAddress &&
61+
params.contract.toLowerCase() === cachedToken.contractAddress.toLowerCase() &&
5962
params.chain === cachedToken.chainId
6063
)
6164
)

0 commit comments

Comments
 (0)