mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Allow non strigified typed data params
This commit is contained in:
parent
a8aca0a326
commit
d26a8e7f82
@ -1168,9 +1168,12 @@ module.exports = class MetamaskController extends EventEmitter {
|
||||
try {
|
||||
const cleanMsgParams = await this.typedMessageManager.approveMessage(msgParams)
|
||||
|
||||
// For some reason every version after V1 has stringified params.
|
||||
// For some reason every version after V1 used stringified params.
|
||||
if (version !== 'V1') {
|
||||
cleanMsgParams.data = JSON.parse(cleanMsgParams.data)
|
||||
// But we don't have to require that. We can stop suggesting it now:
|
||||
if (typeof cleanMsgParams.data === 'string') {
|
||||
cleanMsgParams.data = JSON.parse(cleanMsgParams.data)
|
||||
}
|
||||
}
|
||||
|
||||
const address = sigUtil.normalize(cleanMsgParams.from)
|
||||
|
Loading…
Reference in New Issue
Block a user