-
Notifications
You must be signed in to change notification settings - Fork 5k
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 tokenId
type validation in wallet_watchAsset
middleware
#19738
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Looks great! Could use a unit test though |
New and updated dependency changes detected. Learn more about Socket for GitHub ↗︎ 🚮 Removed packages: @metamask/test-dapp@7.0.0 |
254ba13
to
f7efb6e
Compare
tokenId
type validation in wallet_watchAsset
middleware
6c0d11d
to
f7efb6e
Compare
f7efb6e
to
39bb1d0
Compare
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.
LGTM!
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.
LGTM!
Edit: Whoops, forgot I approved this already, had it open in a duplicated tab that I hadn't refreshed.
Builds ready [39bb1d0]
Page Load Metrics (1744 ± 98 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
if ( | ||
[ERC721, ERC1155].includes(type) && | ||
tokenId && | ||
typeof tokenId !== 'string' |
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.
this would allow
{
"type": "ERC721",
"asset": {
"tokenId": 0
}
}
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.
Good catch. Fixed here
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.
LGTM
Builds ready [b526799]
Page Load Metrics (1624 ± 103 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Codecov Report
@@ Coverage Diff @@
## develop #19738 +/- ##
===========================================
+ Coverage 69.83% 69.85% +0.02%
===========================================
Files 980 980
Lines 36886 36897 +11
Branches 9890 9894 +4
===========================================
+ Hits 25757 25772 +15
+ Misses 11129 11125 -4
|
Fixes /~https://github.com/MetaMask/MetaMask-planning/issues/853
see discussion here