Skip to content

Commit

Permalink
fix: liq.price
Browse files Browse the repository at this point in the history
  • Loading branch information
deep-path committed Nov 18, 2024
1 parent f3b3439 commit e1f48e7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions screens/Trading/components/TradingOperate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ const TradingOperate = () => {
// if (!isValidate) {
// setIsDisabled(false);
// }

let liqPriceX = 0;
if (rangeMount > 1) {
if (activeTab == "long") {
Expand All @@ -284,13 +283,12 @@ const TradingOperate = () => {
liqPriceX =
(((Number(shortInput) +
Number(shrinkToken(estimateData?.min_amount_out, decimalsC))) as any) *
rangeMount *
(getAssetPrice(ReduxcategoryAssets2) as any) *
(1 - marginConfigTokens.min_safety_buffer / 10000)) /
shortOutput;
}
}

console.log(Number(shrinkToken(estimateData?.min_amount_out, decimalsC)));
// const total_debt =
// (shrinkToken(ReduxcategoryAssets2.margin_debt.balance, decimalsD) as any) * priceD;
// const total_hp_fee =
Expand Down Expand Up @@ -655,10 +653,10 @@ const TradingOperate = () => {
<div className="flex items-center justify-between text-sm mb-4">
<div className="text-gray-300">Fee</div>
<div className="flex items-center justify-center">
<p className="border-b border-dashed border-dark-800">{Fee.fee}</p>
<p className="border-b border-dashed border-dark-800">{Fee.fee.toFixed(6)}</p>
NEAR
<span className="text-xs text-gray-300 ml-1.5">
(${Fee.fee * (Fee.price || 0)})
(${(Fee.fee * (Fee.price || 0)).toFixed(6)})
</span>
</div>
</div>
Expand Down

0 comments on commit e1f48e7

Please sign in to comment.