Open elena-zh opened 1 year ago
Hey, looks like issue is already resolved. On trying to set same token in to and from input box , it's taking the token in one box and asking to select token in other one and if there are already two different tokens present , it's interchanging the value, not letting to keep same value in both box.
Hey, looks like issue is already resolved. On trying to set same token in to and from input box , it's taking the token in one box and asking to select token in other one and if there are already two different tokens present , it's interchanging the value, not letting to keep same value in both box.
Hey @Wholesomebruh , thank you for checking this. Unfortunately, the issue is still reproducible. Please, follow the exact steps in the issue description in order to reproduce it.
Indeed there's an issue.
I think it only happens cause the check if its the same token or not is done based on the parameters of the URL https://github.com/cowprotocol/cowswap/blob/fix-issues-same-token/apps/cowswap-frontend/src/modules/trade/hooks/setupTradeState/useSetupTradeState.ts#L133
Ideally, we would convert that into an address for the check. The derived state shows WETH and 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 is the same thing. So I would suggest using that
AR: the same token is displayed in the from/to fields (a token name and its address in the URL) ER: impossible to pick the same token