From 91eb42a40b15f037378e674e2188855d82fd9de8 Mon Sep 17 00:00:00 2001 From: naturexie <786281870@qq.com> Date: Fri, 24 Jan 2025 16:51:29 +0800 Subject: [PATCH] fix: hp_fee issue --- hooks/useLiqPrice.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hooks/useLiqPrice.ts b/hooks/useLiqPrice.ts index c7bd1183..20545dd3 100644 --- a/hooks/useLiqPrice.ts +++ b/hooks/useLiqPrice.ts @@ -50,11 +50,9 @@ export function useLiqPrice({ uahpi: token_d_asset.uahpi, uahpi_at_open, }); - const hp_fee = new Decimal(token_d_price).mul( - shrinkToken( - hp_fee_amount, - token_d_asset.metadata.decimals + token_d_asset.config.extra_decimals, - ), + const hp_fee = shrinkToken( + hp_fee_amount, + token_d_asset.metadata.decimals + token_d_asset.config.extra_decimals, ); // (token_c_value + token_p_value) * percent > total_debt + total_hp_fee if (position_type == "Long") {