-
Notifications
You must be signed in to change notification settings - Fork 28
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
feat: display same source and destination token warning on widget #945
base: next
Are you sure you want to change the base?
Conversation
@@ -38,6 +38,8 @@ export function NoResult(props: PropTypes) { | |||
fetch | |||
); | |||
|
|||
console.log(info); |
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.
Please remove logs
@@ -107,7 +105,14 @@ export function useSwapInput({ | |||
affiliatePercent, | |||
affiliateWallets, | |||
} = params; | |||
if (areTokensEqual(fromToken, toToken)) { | |||
console.log('....'); |
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.
Please remove logs
In the current implementation, the warning appears after the debounce period for the input. If the user changes the input, the warning will be cleared and then reappear after the debounce delay. I suggest leaving the existing logic for the quote unchanged and simply adding a check and warning for this specific state in the relevant component, so the warning displays immediately without delay. |
5a19776
to
346c93e
Compare
Summary
If the source and destination tokens are selected as the same, we should show a warning to the user.
Fixes # (issue)
How did you test this change?
Select the same token for both the source and destination, and also enter an amount
Checklist: