-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add metamask_watchAsset #4606
Merged
Merged
Add metamask_watchAsset #4606
Changes from 40 commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
5d7c281
Begin adding eth_watchToken
danfinlay f14ed32
Begin letting UI show suggested tokens
danfinlay 5e4f3e4
Get popup appearing when suggesting new token
danfinlay d26ce80
Linted
danfinlay 0481335
Improved rpc-engine usage
danfinlay 21a61f2
merge develop
estebanmino 081884b
rpc-engine not crashing when eth_watchToken
estebanmino 12dd7a7
popup initializing with suggested tokens
estebanmino 9ac9f53
eth_watchToken working
estebanmino 78ad3c3
add suggested token params validation
estebanmino 88933f3
fix duplicated action
estebanmino af35b41
new confirm add suggested token component
estebanmino a57f56f
clean confirm add token component
estebanmino 1f8a808
wip watch token old ui
estebanmino 00d1f6f
watch token on old ui
estebanmino 3f57d5f
Merge branch 'develop' into WatchTokenFeature
estebanmino 15ea8c0
fix merge
estebanmino 33357e3
refactor unused code
estebanmino c245405
show token address summary on old ui
estebanmino 8f5b80a
update method to metamask_watchToken
estebanmino a4c3f6b
add support for images base64 and urls on new ui
estebanmino a4b6b23
watchToken to watchAsset
estebanmino b766104
add suggested tokens objects in metamask state
estebanmino 5289a36
change watchAsset to new spec for type ERC20
estebanmino a36ea0e
show watch asset image from hide token modal
estebanmino 2ace30b
WIP
estebanmino bb868f5
correct behavior when notification is closed when popup
estebanmino dbab9a0
delete according image when token added with watchToken deleted
estebanmino 81cd29d
Merge branch 'develop' into WatchTokenFeature
estebanmino 68c1b4c
watchAsset returns result wether token was added or not
estebanmino 6fa889a
refactor watchToken related functions
estebanmino 3a3732e
returning error in watchAsset
estebanmino 6ccf281
unit tests for watchAsset
estebanmino 4e6c71e
Merge branch 'develop' into WatchTokenFeature
estebanmino 153731e
fix integration tests on balance component with new watchAsset
estebanmino 56bed3f
expose web3.metamask.watchAsset
estebanmino b59a1e9
typo watchAsset imageUrl to image
estebanmino 053e262
delete web3.metamassk.watchAsset
estebanmino 8af45d5
add watchAsset CHANGELOG
estebanmino 3106374
watchAsset small changes
estebanmino e743f44
fix conflicts
estebanmino File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
Not sure if it's really needed but maybe use toChecksumAddress or normalizeAddress to make sure it will always find the right key (assuming that assetImages keys are already checksummed)
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.
Yes, in line 295 the normalization happens, so for each token added it will have as key the correct normalized address.