diff --git a/packages/universal-swap/package.json b/packages/universal-swap/package.json index 82c40e7f..5f88f14a 100644 --- a/packages/universal-swap/package.json +++ b/packages/universal-swap/package.json @@ -1,6 +1,6 @@ { "name": "@oraichain/oraidex-universal-swap", - "version": "1.0.53", + "version": "1.0.54", "main": "build/index.js", "files": [ "build/" diff --git a/packages/universal-swap/src/helper.ts b/packages/universal-swap/src/helper.ts index e81daad7..fd51240b 100644 --- a/packages/universal-swap/src/helper.ts +++ b/packages/universal-swap/src/helper.ts @@ -244,6 +244,8 @@ export const addOraiBridgeRoute = ( toToken: TokenItemType, destReceiver?: string ): SwapRoute => { + // TODO: recheck cosmos address undefined (other-chain -> oraichain) + if (!sourceReceiver) throw generateError(`Cannot get source if the sourceReceiver is empty!`); const source = getSourceReceiver(sourceReceiver, fromToken.contractAddress); const { swapRoute, universalSwapType } = getRoute(fromToken, toToken, destReceiver); if (swapRoute.length > 0) return { swapRoute: `${source}:${swapRoute}`, universalSwapType };