Skip to content

Commit

Permalink
Merge pull request #187 from oraichain/fix/check-swap-route
Browse files Browse the repository at this point in the history
[Review] Recheck Cosmos Address Other-Chain to Oraichain
  • Loading branch information
haunv3 authored Feb 28, 2024
2 parents 03685a5 + 85b89d5 commit 8aa4d2c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/universal-swap/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oraichain/oraidex-universal-swap",
"version": "1.0.53",
"version": "1.0.54",
"main": "build/index.js",
"files": [
"build/"
Expand Down
2 changes: 2 additions & 0 deletions packages/universal-swap/src/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Expand Down

0 comments on commit 8aa4d2c

Please sign in to comment.