Skip to content

Commit

Permalink
disable flipping swap tokens when quote is loading
Browse files Browse the repository at this point in the history
  • Loading branch information
eli-d committed Dec 17, 2024
1 parent 0477a18 commit ad299e2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions web/src/components/SwapForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,8 @@ export const SwapForm = () => {
className={
"z-50 mt-[-12px] size-[32px] p-0 transition-all hover:rounded-[20px] hover:bg-white md:mt-[-15px] md:size-[40px]"
}
// flipping when quote is loading can lead to invalid state, e.g. swapping 0 -> >0
disabled={quoteIsLoading}
onClick={flipTokens}
>
<Swap className="h-[17px] w-[11px]" />
Expand Down

0 comments on commit ad299e2

Please sign in to comment.