diff options
author | Dan Finlay <dan@danfinlay.com> | 2016-06-16 01:48:36 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2016-06-16 01:48:36 +0800 |
commit | 37e552e95d67c8cf0273d0bb00eccd6ba0424f64 (patch) | |
tree | 5edc507bed77db6d3f4eede0bd3662e369c5d263 /app | |
parent | a4b87b36257ce63fa609c03aad3332fad9bccb0d (diff) | |
download | tangerine-wallet-browser-37e552e95d67c8cf0273d0bb00eccd6ba0424f64.tar tangerine-wallet-browser-37e552e95d67c8cf0273d0bb00eccd6ba0424f64.tar.gz tangerine-wallet-browser-37e552e95d67c8cf0273d0bb00eccd6ba0424f64.tar.bz2 tangerine-wallet-browser-37e552e95d67c8cf0273d0bb00eccd6ba0424f64.tar.lz tangerine-wallet-browser-37e552e95d67c8cf0273d0bb00eccd6ba0424f64.tar.xz tangerine-wallet-browser-37e552e95d67c8cf0273d0bb00eccd6ba0424f64.tar.zst tangerine-wallet-browser-37e552e95d67c8cf0273d0bb00eccd6ba0424f64.zip |
Sign binary data not hash on eth_sign
Diffstat (limited to 'app')
-rw-r--r-- | app/scripts/lib/idStore.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/scripts/lib/idStore.js b/app/scripts/lib/idStore.js index e9b9e0e06..e77ba87f8 100644 --- a/app/scripts/lib/idStore.js +++ b/app/scripts/lib/idStore.js @@ -492,8 +492,8 @@ function IdManagement(opts) { // sign message var privKeyHex = this.exportPrivateKey(address) var privKey = ethUtil.toBuffer(privKeyHex) - var msgHash = ethUtil.sha3(message) - var msgSig = ethUtil.ecsign(msgHash, privKey) + var msgBuffer = new Buffer(message.replace('0x',''), 'hex') + var msgSig = ethUtil.ecsign(msgBuffer, privKey) var rawMsgSig = ethUtil.bufferToHex(concatSig(msgSig.v, msgSig.r, msgSig.s)) return rawMsgSig } |