Merged
Conversation
Additional validation was added in #9907 to ensure that the "Known contract address" warning was shown when sending tokens to another token address after switching assets on the Send screen. Unfortunately this change had the unintended side-effect of preventing _all_ token sends after switching assets, so long as the recipient was not an internal address. The problem is that the `validate` function expects to be passed the address of the token send recipient in the case where a token is selected. Instead the token address was being passed to the validate function. The `query` state is now used, which should always contain the recipient address. This is the same state used in the only other place the `validate` function is called.
darkwing
approved these changes
Dec 10, 2020
Contributor
darkwing
left a comment
There was a problem hiding this comment.
I executed both sets of testing steps manually, both worked as described. Well done, so quick!
Collaborator
Builds ready [1f9de59]
Page Load Metrics (582 ± 24 ms)
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Additional validation was added in #9907 to ensure that the "Known contract address" warning was shown when sending tokens to another token address after switching assets on the Send screen. Unfortunately this change had the unintended side-effect of preventing all token sends after switching assets, so long as the recipient was not an internal address.
The problem is that the
validatefunction expects to be passed the address of the token send recipient in the case where a token is selected. Instead the token address was being passed to the validate function.The
querystate is now used, which should always contain the recipient address. This is the same state used in the only other place thevalidatefunction is called.Fixes: #10044
Manual testing steps:
To test that the validation doesn't incorrectly flag a non-contract-address as a contract address:
To test that the validation still works when the recipient really is a known token address:
0x0F5D2fB29fb7d3CFeE444a200298f468908cC942 (MANA)Known contract addressshould show.