price handling fixes affecting orderbuild, pairprice, ordershapes, etc
This commit is contained in:
@@ -68,7 +68,7 @@ class TrancheShapes {
|
||||
* 10 ** -(amountIsBase ? this.symbol.base.d : this.symbol.quote.d)
|
||||
const weight = Number(filledAmount) / Number(this.status.order.amount)
|
||||
const amountSymbol = amountIsBase ? this.symbol.base.s : this.symbol.quote.s
|
||||
console.log('fillpoint', buy, filledAmount, this.status.order, this.symbol)
|
||||
// console.log('fillpoint', buy, filledAmount, this.status.order, this.symbol)
|
||||
const time = f.time
|
||||
const out = Number(f.filledOut) / (1-this.status.order.route.fee/1000000)
|
||||
let price = out / Number(f.filledIn)
|
||||
@@ -89,7 +89,7 @@ class TrancheShapes {
|
||||
const symbol = this.symbol
|
||||
const scale = 10**symbol.decimals;
|
||||
const buy = status.order.tokenIn === this.symbol.quote.a
|
||||
const inverted = buy === symbol.inverted
|
||||
const inverted = buy
|
||||
amount = Number(amount)
|
||||
* 10 ** -(buy ? this.symbol.base.d : this.symbol.quote.d)
|
||||
const amountSymbol = buy ? this.symbol.base.s : this.symbol.quote.s
|
||||
|
||||
Reference in New Issue
Block a user