Update sign-typed-data.js file to support signTypedData_v4
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- cryptography
Research direction
Start in sign-typed-data.js at sanitizeData and trace how signTypedData_v4 input reaches it. Confirm the data is parsed before schema filtering and that the EIP712Domain error is avoided; done means v4 data is sanitized without the reported TypeError.
Written by the indexing model from the issue text.
Description
Update the sanitizeData function to parse data properly using JSON.parse and avoid error: TypeError: Cannot read properties of undefined (reading 'EIP712Domain')
function sanitizeData(unparsedData) {
const data=JSON.parse(unparsedData)
const sanitizedData = {};
for (const key in exports.TYPED_MESSAGE_SCHEMA.properties) {
if (data[key]) {
sanitizedData[key] = data[key];
}
}
if ('types' in sanitizedData) {
sanitizedData.types = Object.assign({ EIP712Domain: [] }, sanitizedData.types);
}
return sanitizedData;
}
- Dominant language
- TypeScript
- Stars
- 586
- Forks
- 231
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MetaMask/eth-sig-util
-
team-wallet-framework
Difficulty 1/5 Under an hour Newbie friendliness 50/100
MetaMask/eth-sig-util#353 ·
-
tsconfig: Disable `strictNullChecks`, enable `strict`Possibly taken @itzKLAUS claimed this 35 days ago. Openteam-wallet-framework
Difficulty 1/5 Under an hour Newbie friendliness 55/100
MetaMask/eth-sig-util#352 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
MetaMask/eth-sig-util#328 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
MetaMask/eth-sig-util#304 · 4 comments · 4 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
MetaMask/eth-sig-util#303 ·
All issues in MetaMask/eth-sig-util
Similar issues
-
Chip source filter and denial markers miss Storage rows when a Storage activity source is pickedOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
omdsh-dev/DSH-better-sidebar#1141 ·
Maintainers usually reply within 2 days
-
desktop linux photos
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Cleanup SetupPossibly taken @AlexanderKaran claimed this today. Opendocumentation enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
e18e/framework-tracker#769 ·
Maintainers usually reply within 1 day
-
bug v2
Difficulty 1/5 Under an hour Newbie friendliness 88/100
modelcontextprotocol/servers#5483 ·
Maintainers usually reply within 1 day