We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 52f8593 commit 7d3db57Copy full SHA for 7d3db57
packages/core-mobile/app/new/features/swapV2/screens/SwapScreen.tsx
@@ -582,12 +582,8 @@ export const SwapScreen = (): JSX.Element => {
582
583
useEffect(() => {
584
if (fromToken && toToken && fromToken.localId === toToken.localId) {
585
- if (prevFromRef.current !== fromToken) {
586
- setToToken(undefined)
587
- } else if (prevToRef.current !== toToken) {
588
- setFromToken(undefined)
589
- }
590
-
+ // Always clear the "to" field when same token is selected (matches swap v1 behavior)
+ setToToken(undefined)
591
setAmount(undefined)
592
setToTokenValue(undefined)
593
setFromTokenValue(undefined)
0 commit comments