From c511a2ba8da9985536cb168fa3683c77cfaae984 Mon Sep 17 00:00:00 2001 From: thomasRalee Date: Tue, 10 Dec 2024 04:42:24 +0800 Subject: [PATCH] fix: build --- .../sdk-ts/src/service/TokenFactoryStatic.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/sdk-ts/src/service/TokenFactoryStatic.ts b/packages/sdk-ts/src/service/TokenFactoryStatic.ts index 19787d5b5..27204b4f1 100644 --- a/packages/sdk-ts/src/service/TokenFactoryStatic.ts +++ b/packages/sdk-ts/src/service/TokenFactoryStatic.ts @@ -88,13 +88,15 @@ export class TokenFactoryStatic { return this.tokensByDenom[formattedDenom] } - if (this.tokensByAddress[formattedDenom]) { - const verifiedToken = this.tokensByAddress[formattedDenom].find( - ({ tokenVerification }) => - tokenVerification === TokenVerification.Verified, - ) - - return verifiedToken || this.tokensByAddress[formattedDenom][0] + if (!this.tokensByAddress[formattedDenom]) { + return } + + const verifiedToken = this.tokensByAddress[formattedDenom].find( + ({ tokenVerification }) => + tokenVerification === TokenVerification.Verified, + ) + + return verifiedToken || this.tokensByAddress[formattedDenom][0] } }