From 5f3db17521e87a3e212b3024f95f33facdedd800 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Darley=20Ara=C3=BAjo=20Silva?= Date: Tue, 26 Sep 2023 19:13:31 -0300 Subject: [PATCH] Addition of condition to prevent the fee amount from being withdrawn when there are no unsettled orders. --- src/connectors/kujira/kujira.convertors.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/connectors/kujira/kujira.convertors.ts b/src/connectors/kujira/kujira.convertors.ts index e43d10b337..7063722301 100644 --- a/src/connectors/kujira/kujira.convertors.ts +++ b/src/connectors/kujira/kujira.convertors.ts @@ -621,11 +621,13 @@ export const convertKujiraSettlementToSettlement = ( const rawAmounts: string[] = [nativeFees]; - if (rawBaseTokenFees) { - rawAmounts.push(rawBaseTokenFees); - } - if (rawQuoteTokenFees) { - rawAmounts.push(rawQuoteTokenFees); + if (rawBaseTokenFees && rawQuoteTokenFees) { + if (rawBaseTokenFees) { + rawAmounts.push(rawBaseTokenFees); + } + if (rawQuoteTokenFees) { + rawAmounts.push(rawQuoteTokenFees); + } } const tokenWithdraw = IMap().asMutable();