Skip to content

Commit

Permalink
chore: fix type build
Browse files Browse the repository at this point in the history
  • Loading branch information
SGiaccobasso committed Dec 24, 2024
1 parent 340090e commit 4fa2c7f
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export async function scanInterchainTokenOnChainByTokenId(
const serviceClient =
ctx.contracts.createInterchainTokenServiceClient(config);

const [tokenAddress, tokenManagerAddress] = await Promise.all([
const [tokenAddress, tokenManagerAddress] = (await Promise.all([
serviceClient.reads
.interchainTokenAddress({
tokenId,
Expand All @@ -34,7 +34,7 @@ export async function scanInterchainTokenOnChainByTokenId(
tokenId,
})
.catch(() => null),
]);
])) as [`0x${string}` | null, `0x${string}` | null];

if (!tokenAddress || !tokenManagerAddress) {
return {
Expand All @@ -58,13 +58,13 @@ export async function scanInterchainTokenOnChainByTokenId(
tokenManagerClient.reads.tokenAddress().catch(() => null),
]);

const tokenManagerType = Maybe.of(tokenManagerTypeCode).mapOrNull(
getTokenManagerTypeFromBigInt
);
const tokenManagerType = Maybe.of(
tokenManagerTypeCode as bigint
).mapOrNull(getTokenManagerTypeFromBigInt);

const erc20Client = ctx.contracts.createERC20Client(
config,
originTokenAddress ?? tokenAddress
(originTokenAddress as `0x${string}`) ?? tokenAddress
);

const [tokenName, tokenSymbol, tokenDecimals] = await Promise.all([
Expand Down

0 comments on commit 4fa2c7f

Please sign in to comment.