mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-26 12:29:06 +01:00
Sign binary data not hash on eth_sign
This commit is contained in:
parent
a4b87b3625
commit
37e552e95d
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user