Skip to content

Commit

Permalink
fix(orders): Fixing bug with sats to bch calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
christroutner committed May 2, 2022
1 parent 4ee007f commit 23b38b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/admin-lte/orders/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)}`

Expand Down

0 comments on commit 23b38b0

Please sign in to comment.