aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorbitpshr <mail@bitpshr.net>2018-09-14 03:12:08 +0800
committerbitpshr <mail@bitpshr.net>2018-09-14 03:42:27 +0800
commit42fdcf6239fc9278cfa85b6ae6cc025cef0e35ae (patch)
tree9ba844dae9ba2a5ed1fadc6dad6a733de4839d7e /app
parent68c25542965ae89badc284bf30e1f426f27aa5ae (diff)
downloadtangerine-wallet-browser-42fdcf6239fc9278cfa85b6ae6cc025cef0e35ae.tar
tangerine-wallet-browser-42fdcf6239fc9278cfa85b6ae6cc025cef0e35ae.tar.gz
tangerine-wallet-browser-42fdcf6239fc9278cfa85b6ae6cc025cef0e35ae.tar.bz2
tangerine-wallet-browser-42fdcf6239fc9278cfa85b6ae6cc025cef0e35ae.tar.lz
tangerine-wallet-browser-42fdcf6239fc9278cfa85b6ae6cc025cef0e35ae.tar.xz
tangerine-wallet-browser-42fdcf6239fc9278cfa85b6ae6cc025cef0e35ae.tar.zst
tangerine-wallet-browser-42fdcf6239fc9278cfa85b6ae6cc025cef0e35ae.zip
Update new method namespace from v2 to v3
Diffstat (limited to 'app')
-rw-r--r--app/scripts/lib/typed-message-manager.js2
-rw-r--r--app/scripts/metamask-controller.js4
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