xdepthmaker: fix aggregatePrice quantity issue

This commit is contained in:
c9s 2023-12-06 18:05:33 +08:00
parent b8fb2ac478
commit 35dabe8a72
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -27,6 +27,6 @@ func aggregatePrice(pvs types.PriceVolumeSlice, requiredQuantity fixedpoint.Valu
totalAmount = totalAmount.Add(pv.Volume.Mul(pv.Price))
}
price = totalAmount.Div(requiredQuantity)
price = totalAmount.Div(requiredQuantity.Sub(q))
return price
}