From 0ea5d4e8404eaa2aa4996c29e187b72f4321bfa4 Mon Sep 17 00:00:00 2001 From: Dmytro Date: Mon, 23 Oct 2023 19:01:19 +0100 Subject: [PATCH] metaport#193 Fix wrapped tokens lookup --- src/core/metaport.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/metaport.ts b/src/core/metaport.ts index da4e79f..7678f95 100644 --- a/src/core/metaport.ts +++ b/src/core/metaport.ts @@ -99,7 +99,7 @@ export function createWrappedTokensMap( ): TokenDataTypesMap { const wrappedTokens: TokenDataTypesMap = getEmptyTokenDataMap() const tokenType = TokenType.erc20 - if (!chainName1) return wrappedTokens + if (!chainName1 || !config.connections[chainName1][tokenType]) return wrappedTokens Object.keys(config.connections[chainName1][tokenType]).forEach((tokenKeyname) => { const token = config.connections[chainName1][tokenType][tokenKeyname] const wrapperAddress = findFirstWrapperAddress(token)