fix signMessage

pull/5370/head
Iuri Matias 5 years ago committed by yann300
parent 1fc6b8ed3e
commit d994b2682a
  1. 14
      src/blockchain/providers/vm.js

@ -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))

Loading…
Cancel
Save