From adf23e303a1cebed50d40f409e258cae32628215 Mon Sep 17 00:00:00 2001 From: Chien Nguyen Date: Tue, 17 Dec 2024 17:27:12 +0700 Subject: [PATCH] Update divCeil --- pkg/source/limitorder/pool_simulator_calc_amount_in.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/source/limitorder/pool_simulator_calc_amount_in.go b/pkg/source/limitorder/pool_simulator_calc_amount_in.go index 1364cf65e..e8b942d61 100644 --- a/pkg/source/limitorder/pool_simulator_calc_amount_in.go +++ b/pkg/source/limitorder/pool_simulator_calc_amount_in.go @@ -168,6 +168,6 @@ func (p *PoolSimulator) calcMakerAssetAmountBeforeFee(order *order, makingAmount func divCeil(a, b *big.Int) *big.Int { // (a + b - 1) / b a = new(big.Int).Add(a, b) - a = new(big.Int).Sub(a, big.NewInt(1)) + a.Sub(a, big.NewInt(1)) return a.Div(a, b) }