Skip to content

Commit

Permalink
Addition of condition to prevent the fee amount from being withdrawn …
Browse files Browse the repository at this point in the history
…when there are no unsettled orders.
  • Loading branch information
darley-silva-funttastic committed Sep 26, 2023
1 parent e6ef504 commit 5f3db17
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/connectors/kujira/kujira.convertors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<TokenId, Withdraw>().asMutable();
Expand Down

0 comments on commit 5f3db17

Please sign in to comment.