From 23b38b0d31b9b9060d928c343d6d0c854e55d783 Mon Sep 17 00:00:00 2001 From: Chris Troutner Date: Mon, 2 May 2022 07:06:39 -0700 Subject: [PATCH] fix(orders): Fixing bug with sats to bch calculation --- src/components/admin-lte/orders/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/admin-lte/orders/index.js b/src/components/admin-lte/orders/index.js index 4d87e59..85fd126 100644 --- a/src/components/admin-lte/orders/index.js +++ b/src/components/admin-lte/orders/index.js @@ -203,7 +203,8 @@ class Orders extends React.Component { const order = dataArr[i] // console.log(`order: ${JSON.stringify(order, null, 2)}`) - const satsTotal = order.numTokens * order.rateInBaseUnit + const satsTotal = Math.ceil(order.numTokens * order.rateInBaseUnit) + console.log(`satsTotal: ${satsTotal}`) let usdTotal = bchSpotPrice * this.props.bchWallet.bchjs.BitcoinCash.toBitcoinCash(satsTotal) usdTotal = `$${this.props.bchWallet.bchjs.Util.floor8(usdTotal)}`