From 06e5aee6ad704dc508ff2cf1b280a1e10b60ae11 Mon Sep 17 00:00:00 2001 From: uncoolzero <107518216+uncoolzero@users.noreply.github.com> Date: Tue, 9 Jul 2024 16:45:45 +0200 Subject: [PATCH] simplify --- projects/ui/src/state/farmer/market/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/ui/src/state/farmer/market/index.ts b/projects/ui/src/state/farmer/market/index.ts index 72b0fc7ed1..22793a4dfe 100644 --- a/projects/ui/src/state/farmer/market/index.ts +++ b/projects/ui/src/state/farmer/market/index.ts @@ -95,8 +95,8 @@ export const castPodOrder = (order: PodOrderFragment): PodOrder => { BEAN[1].decimals ); - const beanAmountRemaining = toTokenUnitsBN(beanAmount.minus(beanAmountFilled).toFixed(6, BigNumber.ROUND_UP), 0); - const podAmountRemaining = toTokenUnitsBN(beanAmountRemaining.div(pricePerPod).toFixed(6, BigNumber.ROUND_UP), 0); + const beanAmountRemaining = beanAmount.minus(beanAmountFilled).dp(6, BigNumber.ROUND_UP); + const podAmountRemaining = beanAmountRemaining.div(pricePerPod).dp(6, BigNumber.ROUND_UP); const podAmount = podAmountFilled.plus(podAmountRemaining); return {