Skip to content

Commit

Permalink
Fix bug with EIP191 message signing (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
icedevml authored Jan 5, 2024
1 parent 921889e commit 817410e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion halo/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ async function cmdSign(options, args) {
throw new HaloLogicError("Invalid message format specified. Valid formats: text, hex.");
}

digestBuf = Buffer.from(ethers.utils.hashMessage(messageBuf).slice(2), "hex");
digestBuf = Buffer.from(ethers.utils.hashMessage('0x' + messageBuf.toString('hex')).slice(2), "hex");
} else if (args.hasOwnProperty("typedData") && typeof args.typedData !== "undefined") {
let hashStr;

Expand Down

0 comments on commit 817410e

Please sign in to comment.