fix(orders): Fixing bug with sats to bch calculation

This commit is contained in:
Chris Troutner
2022-05-02 07:06:39 -07:00
parent 4ee007f7b0
commit 23b38b0d31
+2 -1
View File
@@ -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)}`