From c67c0c0a77adb5740cb2277c9fe36c9572561343 Mon Sep 17 00:00:00 2001 From: Matias Poblete Date: Wed, 31 Jul 2024 11:00:30 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9Fix=20strictRecivePaths=20in=20SDEX?= =?UTF-8?q?=20quote?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/helpers/horizon/getHorizonPath.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helpers/horizon/getHorizonPath.ts b/src/helpers/horizon/getHorizonPath.ts index 5d841b3b..f4a667a6 100644 --- a/src/helpers/horizon/getHorizonPath.ts +++ b/src/helpers/horizon/getHorizonPath.ts @@ -209,7 +209,7 @@ export function getHorizonBestPath( if (!args.amount || !args.assetFrom || !args.assetTo || !serverHorizon) return; if (payload.tradeType === TradeType.EXACT_INPUT) { try { - const send = serverHorizon?.strictSendPaths(args.assetFrom, args.amount, [args.assetTo]) + const send = serverHorizon.strictSendPaths(args.assetFrom, args.amount, [args.assetTo]) .call().then((res) => res.records); return send?.then((res) => { const maxObj = res.reduce((maxObj, obj) => { @@ -228,7 +228,7 @@ export function getHorizonBestPath( } } else if (payload.tradeType === TradeType.EXACT_OUTPUT) { try { - const receive = serverHorizon?.strictReceivePaths([args.assetFrom!], args.assetTo!, args?.amount!) + const receive = serverHorizon.strictReceivePaths([args.assetTo], args.assetFrom, args.amount) .call().then((res) => res.records); return receive?.then((res) => { const minObj = res.reduce((minObj, obj) => {