Skip to content

Commit

Permalink
Fix swap component
Browse files Browse the repository at this point in the history
  • Loading branch information
xbtmatt committed Dec 4, 2024
1 parent ebe11b4 commit 9f4e97e
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,8 @@ export default function SwapComponent({
<FlipInputsArrow
onClick={() => {
setInputAmount(outputAmount);
// This is done as to not display an old value if the swap simulation fails.
setOutputAmount(0n);
setPrevious(0n);
setOutputAmount(inputAmount);
setPrevious(inputAmount);
setIsSell((v) => !v);
}}
/>
Expand Down

0 comments on commit 9f4e97e

Please sign in to comment.