-
-
Notifications
You must be signed in to change notification settings - Fork 351
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 Malformed Signatures #290
Conversation
}, | ||
message: { | ||
name: 'Hello, Bob!', | ||
extraData: 'This data is not typed!', |
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 is extra data not typed
*/ | ||
signEmptyDomain.onclick = async () => { | ||
const msgParams = { | ||
domain: {}, |
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 is the empty domain
{ name: 'verifyingContract', type: 'address' }, | ||
], | ||
OrderComponents: [ | ||
{ name: 'consideration', type: 'ConsiderationItem[+' }, |
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 is an invalid type definition
wallet: 'Hello, Bob!', | ||
extraData: 'This data is not typed!', | ||
}, | ||
primaryType: 'Non-Existent', |
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 is an invalid primary type
}, | ||
], | ||
}, | ||
types: { |
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.
no primary type is defined
chainId: chainIdInt, | ||
name: 'Seaport', | ||
version: '1.5', | ||
verifyingContract: 1, |
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 is an invalid value (expected address)
Description
This PR adds different malformed typed signatures.
Note, at the moment, clicking most of them results in breaking MetaMask
This uncovers the following bugs on Extension:
On Mobile, the wallet does not break on any of these cases, bc there's little support to validations overall, so they need to be revised entirely.
Screenshots
test-dapp-malformed-signatures.mp4
test-dapp-malformed-signatues-mobile.mp4