Skip to content

Commit

Permalink
fix: hp_fee issue
Browse files Browse the repository at this point in the history
  • Loading branch information
naturexie committed Jan 24, 2025
1 parent 3c0dab6 commit 91eb42a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions hooks/useLiqPrice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down

0 comments on commit 91eb42a

Please sign in to comment.