Skip to content

Commit

Permalink
Fix rounding in the findOrderBookEntry
Browse files Browse the repository at this point in the history
  • Loading branch information
skubarenko committed Sep 11, 2022
1 parent d016e01 commit 302a227
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/exchange/exchangeManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ export class ExchangeManager implements AtomexService {

const convertedAmount = isBaseCurrencyAmount
? amount
: toFixedBigNumber(amount.div(entry.price), exchangeSymbol.decimals.quoteCurrency, BigNumber.ROUND_FLOOR);
: toFixedBigNumber(amount.div(entry.price), exchangeSymbol.decimals.baseCurrency, BigNumber.ROUND_FLOOR);
if (convertedAmount.isLessThanOrEqualTo(Math.max(...entry.qtyProfile)))
return entry;
}
Expand Down

0 comments on commit 302a227

Please sign in to comment.