diff options
Update new method namespace from v2 to v3
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/lib/typed-message-manager.js | 2 | ||||
-rw-r--r-- | app/scripts/metamask-controller.js | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/scripts/lib/typed-message-manager.js b/app/scripts/lib/typed-message-manager.js index 01e1c9331..b10145f3b 100644 --- a/app/scripts/lib/typed-message-manager.js +++ b/app/scripts/lib/typed-message-manager.js @@ -140,7 +140,7 @@ module.exports = class TypedMessageManager extends EventEmitter { sigUtil.typedSignatureHash(params.data) }, 'Expected EIP712 typed data') break - case 'V2': + case 'V3': let data assert.equal(typeof params, 'object', 'Params should be an object.') assert.ok('data' in params, 'Params must include a data field.') diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index d5005d977..431a49dde 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -991,7 +991,7 @@ module.exports = class MetamaskController extends EventEmitter { case 'V1': signature = sigUtil.signTypedDataLegacy(privKey, { data: cleanMsgParams.data }) break - case 'V2': + case 'V3': signature = sigUtil.signTypedData(privKey, { data: JSON.parse(cleanMsgParams.data) }) break } @@ -1253,7 +1253,7 @@ module.exports = class MetamaskController extends EventEmitter { engine.push(this.preferencesController.requestWatchAsset.bind(this.preferencesController)) engine.push(this.createTypedDataMiddleware('eth_signTypedData', 'V1').bind(this)) engine.push(this.createTypedDataMiddleware('eth_signTypedData_v1', 'V1').bind(this)) - engine.push(this.createTypedDataMiddleware('eth_signTypedData_v2', 'V2').bind(this)) + engine.push(this.createTypedDataMiddleware('eth_signTypedData_v3', 'V3').bind(this)) engine.push(createProviderMiddleware({ provider: this.provider })) // setup connection |