Skip to content

Commit e1f48e7

Browse files
committed
fix: liq.price
1 parent f3b3439 commit e1f48e7

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

screens/Trading/components/TradingOperate.tsx

+3-5
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,6 @@ const TradingOperate = () => {
273273
// if (!isValidate) {
274274
// setIsDisabled(false);
275275
// }
276-
277276
let liqPriceX = 0;
278277
if (rangeMount > 1) {
279278
if (activeTab == "long") {
@@ -284,13 +283,12 @@ const TradingOperate = () => {
284283
liqPriceX =
285284
(((Number(shortInput) +
286285
Number(shrinkToken(estimateData?.min_amount_out, decimalsC))) as any) *
287-
rangeMount *
288286
(getAssetPrice(ReduxcategoryAssets2) as any) *
289287
(1 - marginConfigTokens.min_safety_buffer / 10000)) /
290288
shortOutput;
291289
}
292290
}
293-
291+
console.log(Number(shrinkToken(estimateData?.min_amount_out, decimalsC)));
294292
// const total_debt =
295293
// (shrinkToken(ReduxcategoryAssets2.margin_debt.balance, decimalsD) as any) * priceD;
296294
// const total_hp_fee =
@@ -655,10 +653,10 @@ const TradingOperate = () => {
655653
<div className="flex items-center justify-between text-sm mb-4">
656654
<div className="text-gray-300">Fee</div>
657655
<div className="flex items-center justify-center">
658-
<p className="border-b border-dashed border-dark-800">{Fee.fee}</p>
656+
<p className="border-b border-dashed border-dark-800">{Fee.fee.toFixed(6)}</p>
659657
NEAR
660658
<span className="text-xs text-gray-300 ml-1.5">
661-
(${Fee.fee * (Fee.price || 0)})
659+
(${(Fee.fee * (Fee.price || 0)).toFixed(6)})
662660
</span>
663661
</div>
664662
</div>

0 commit comments

Comments
 (0)