Skip to content

Commit

Permalink
Delete comments
Browse files Browse the repository at this point in the history
  • Loading branch information
saidam90 committed Sep 11, 2024
1 parent 356867a commit df24521
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/app/components/OrderInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,6 @@ function UserInputContainer() {
balance = Math.max(balance - XRD_FEE_ALLOWANCE, 0);
}

// const amount = (balance * newPercentage) / 100;
const amount = Calculator.divide(
Calculator.multiply(balance, newPercentage),
100
Expand Down Expand Up @@ -927,15 +926,13 @@ const PercentageSlider: React.FC<PercentageSliderProps> = ({
} else if (inputToken2 > 0 && isLimitOrder && isSellOrder) {
return;
} else if (balanceToken2 && inputToken2 > 0) {
// const newPercentage = (inputToken2 / balanceToken2) * 100;
const newPercentage = Calculator.multiply(
Calculator.divide(inputToken2, balanceToken2),
100
);
setPercentage(newPercentage);
sliderRef.current.style.backgroundSize = `${newPercentage}% 100%`;
} else if (balanceToken1 && inputToken1 > 0) {
// const newPercentage = (inputToken1 / balanceToken1) * 100;
const newPercentage = Calculator.multiply(
Calculator.divide(inputToken1, balanceToken1),
100
Expand Down Expand Up @@ -1012,7 +1009,6 @@ const PercentageSlider: React.FC<PercentageSliderProps> = ({
className="dot h-[7px] w-[7px] bg-white rounded-full z-[1] cursor-pointer"
style={
{
// left: `${(index * 100) / 5}%`,
left: `Calculator.divide((Calculator.multiply(index, 100)), 5)}%`,
} as React.CSSProperties
}
Expand Down

0 comments on commit df24521

Please sign in to comment.