From da6639be7a3bccabb241c019cc865813c1c5e84d Mon Sep 17 00:00:00 2001 From: signature18632 Date: Mon, 18 Aug 2025 14:10:04 +0700 Subject: [PATCH 1/2] fix tokens --- packages/token-map-register/scripts/bootstrap.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/token-map-register/scripts/bootstrap.ts b/packages/token-map-register/scripts/bootstrap.ts index 497a719..d83efcc 100644 --- a/packages/token-map-register/scripts/bootstrap.ts +++ b/packages/token-map-register/scripts/bootstrap.ts @@ -1,11 +1,13 @@ -import { logger, TokenMap, type TokenMapData } from "@intmax2-function/shared"; +import { logger, TokenMap, type TokenMapInput, TokenType } from "@intmax2-function/shared"; -const data: TokenMapData[] = [ +const data: TokenMapInput[] = [ { tokenIndex: 0, + tokenId: 0n, + tokenType: TokenType.NATIVE, + contractAddress: "0x0000000000000000000000000000000000000000", symbol: "ETH", decimals: 18, - contractAddress: "0x0000000000000000000000000000000000000000", }, ]; From 21dd4b776eeab8da4f2b8df9bf4bec1732cdff5c Mon Sep 17 00:00:00 2001 From: signature18632 Date: Mon, 18 Aug 2025 14:10:42 +0700 Subject: [PATCH 2/2] fix tokenPrice --- packages/token/src/lib/tokenPrice.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/token/src/lib/tokenPrice.ts b/packages/token/src/lib/tokenPrice.ts index 14a57d8..f2ffaf8 100644 --- a/packages/token/src/lib/tokenPrice.ts +++ b/packages/token/src/lib/tokenPrice.ts @@ -37,7 +37,7 @@ export class TokenPrice { } this.tokenPriceList = tokenList; - this.tokenPriceMap = new Map(tokenList.map((token) => [token.id, token])); + this.tokenPriceMap = new Map(tokenList.map((token) => [token.contractAddress, token])); logger.info(`Successfully fetched ${tokenList.length} tokens`); this.clearRetryTimeout();