From f45d9300e22ee93e3f77e90607cb3448d3dff51e Mon Sep 17 00:00:00 2001 From: trung2891 Date: Thu, 3 Oct 2024 14:41:15 +0700 Subject: [PATCH] fix: get last operations --- packages/universal-swap/src/msg/oraichain.ts | 4 ++-- packages/universal-swap/src/msg/osmosis.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/universal-swap/src/msg/oraichain.ts b/packages/universal-swap/src/msg/oraichain.ts index d19d4bf0..c6d2ae30 100644 --- a/packages/universal-swap/src/msg/oraichain.ts +++ b/packages/universal-swap/src/msg/oraichain.ts @@ -285,7 +285,7 @@ export class OraichainMsg { }); } - let tokenOutOfSwap = swapOps.slice[swapOps.length - 1].denom_out; + let tokenOutOfSwap = swapOps[swapOps.length - 1].denom_out; let min_asset = isCw20Token(tokenOutOfSwap) ? { cw20: { @@ -425,7 +425,7 @@ export class OraichainMsg { throw generateError("Error on generate executeMsg on Oraichain: Only support ibc or ibc wasm bridge"); } - let tokenOutOfSwap = swapOps.slice[swapOps.length - 1].denom_out; + let tokenOutOfSwap = swapOps[swapOps.length - 1].denom_out; let min_asset = isCw20Token(tokenOutOfSwap) ? { cw20: { diff --git a/packages/universal-swap/src/msg/osmosis.ts b/packages/universal-swap/src/msg/osmosis.ts index ce88e7fd..3f8745e4 100644 --- a/packages/universal-swap/src/msg/osmosis.ts +++ b/packages/universal-swap/src/msg/osmosis.ts @@ -135,7 +135,7 @@ export class OsmosisMsg { }); } - let tokenOutOfSwap = swapOps.slice[swapOps.length - 1].denom_out; + let tokenOutOfSwap = swapOps[swapOps.length - 1].denom_out; let min_asset = isCw20Token(tokenOutOfSwap) ? { cw20: { @@ -207,7 +207,7 @@ export class OsmosisMsg { throw generateError("Error on generate executeMsg on Oraichain: Only support ibc transfer"); } - let tokenOutOfSwap = swapOps.slice[swapOps.length - 1].denom_out; + let tokenOutOfSwap = swapOps[swapOps.length - 1].denom_out; let min_asset = isCw20Token(tokenOutOfSwap) ? { cw20: {