You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 9, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 9, 2026. It is now read-only.
Update sign-typed-data.js file to support signTypedData_v4 #257
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;
}
Activity