-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: reset trade completely if default token is duplicated #5140
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for returning back this functionality!
Notes:
- the modal does not appear inside Safe, but it was never displayed there before.
- still, it would be nice to enhance the modal UI one day :)
} | ||
|
||
return () => { | ||
if (timeoutId) { | ||
clearTimeout(timeoutId) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need to clear the timeout when the hook umounts?
Summary
By default we use token symbols in URL.
But in some cases we can have more than one token with the same symbol.
In this case if we meet a symbol of that token we do:
It works perfectly with everything but WETH :) Because WETH is a default asset and here we go in a trouble.
To avoid that now we check if the token with duplicated symbol is WETH, then we completely clean up the widget assets state.
Fixes #4323
To Test