Commit 72d3e8ec authored by Iuri Matias's avatar Iuri Matias Committed by yann300

fix signMessage

parent abe70b61
......@@ -55,10 +55,20 @@ class VMProvider {
console.dir("--- signMessage")
const hashedMsg = Web3.utils.sha3(message)
try {
this.web3.eth.sign(account, hashedMsg, (error, signedData) => {
cb(error.message, hashedMsg, signedData)
// this.web3.eth.sign(account, hashedMsg, (error, signedData) => {
this.web3.eth.sign(hashedMsg, account, (error, signedData) => {
if (error) {
return cb(error)
}
console.dir("------")
console.dir(error)
console.dir("------")
cb(null, hashedMsg, signedData)
})
} catch (e) {
console.dir("======")
console.dir(e)
console.dir("======")
cb(e.message)
}
// const personalMsg = ethJSUtil.hashPersonalMessage(Buffer.from(message))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment