Commit 0faaa3f0 authored by Zach Pomerantz's avatar Zach Pomerantz Committed by GitHub

fix: disallow duplicate currencies in widget (#4919)

fix: currency equality check
parent 6acc9300
...@@ -65,7 +65,7 @@ export function useSyncWidgetInputs(defaultToken?: Currency) { ...@@ -65,7 +65,7 @@ export function useSyncWidgetInputs(defaultToken?: Currency) {
setType(TradeType.EXACT_INPUT) setType(TradeType.EXACT_INPUT)
setTokens(() => { setTokens(() => {
return { return {
[otherField]: token === otherToken ? selectingToken : otherToken, [otherField]: otherToken?.equals(token) ? selectingToken : otherToken,
[selectingField]: token, [selectingField]: token,
} }
}) })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment