Skip to content

Commit

Permalink
fix: strip 0x from the unsignned data
Browse files Browse the repository at this point in the history
  • Loading branch information
ieow committed Oct 21, 2024
1 parent 7288c0c commit 55f6cfe
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ async function signTx(
...finalTxParams,
from: undefined, // from is already calculated inside Transaction.from and is not allowed to be passed in
});

const vrs = await sign(Buffer.from(ethTx.unsignedHash));
const msgHash = stripHexPrefix(ethTx.unsignedHash);
const vrs = await sign(Buffer.from(msgHash, "hex"));
let { v } = vrs;
const { r, s } = vrs;

Expand Down

0 comments on commit 55f6cfe

Please sign in to comment.