Skip to content

Commit

Permalink
fix: max_leverage_rate issue
Browse files Browse the repository at this point in the history
  • Loading branch information
naturexie committed Jan 12, 2025
1 parent fcfc12e commit 78b230e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion screens/Trading/components/TradingOperate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,10 @@ const TradingOperate: React.FC<TradingOperateProps> = ({ onMobileClose }) => {
const input = tab === "long" ? longInput : shortInput;
const inputAmount = input ? Number(input) : 0;
const openFeeAmount = (inputAmount * config.open_position_fee_rate) / 10000;
const rangeMountSafty =
config.max_leverage_rate == rangeMount ? rangeMount * 0.999 : rangeMount;
const adjustedInputAmount =
inputAmount * inputUsdCharcate2 * rangeMount - openFeeAmount * inputUsdCharcate2;
inputAmount * inputUsdCharcate2 * rangeMountSafty - openFeeAmount * inputUsdCharcate2;
const inputUsdSetter = tab === "long" ? setLongInputUsd : setShortInputUsd;

// set input usd
Expand Down

0 comments on commit 78b230e

Please sign in to comment.