Skip to content

Commit

Permalink
fix: Strip leading zeros in signature v and s values.
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Badiere <[email protected]>
  • Loading branch information
ebadiere committed Nov 8, 2024
1 parent 3bd07ef commit f88a023
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ describe('@web-socket-batch-2 eth_getTransactionByHash', async function () {
expect(txReceipt.to).to.be.eq(accounts[1].address.toLowerCase());
expect(txReceipt.blockHash).to.be.eq(expectedTxReceipt.block_hash.slice(0, 66));
expect(txReceipt.hash).to.be.eq(expectedTxReceipt.hash);
expect(txReceipt.r).to.be.eq(expectedTxReceipt.r);
expect(txReceipt.s).to.be.eq(expectedTxReceipt.s);
expect(txReceipt.r).to.be.eq(ethers.toQuantity(expectedTxReceipt.r));
expect(txReceipt.s).to.be.eq(ethers.toQuantity(expectedTxReceipt.s));
expect(Number(txReceipt.v)).to.be.eq(expectedTxReceipt.v);
});
});
Expand All @@ -136,8 +136,8 @@ describe('@web-socket-batch-2 eth_getTransactionByHash', async function () {
expect(txReceipt.to).to.be.eq(accounts[1].address.toLowerCase());
expect(txReceipt.blockHash).to.be.eq(expectedTxReceipt.block_hash.slice(0, 66));
expect(txReceipt.hash).to.be.eq(expectedTxReceipt.hash);
expect(txReceipt.r).to.be.eq(expectedTxReceipt.r);
expect(txReceipt.s).to.be.eq(expectedTxReceipt.s);
expect(txReceipt.r).to.be.eq(ethers.toQuantity(expectedTxReceipt.r));
expect(txReceipt.s).to.be.eq(ethers.toQuantity(expectedTxReceipt.s));
expect(Number(txReceipt.v)).to.be.eq(expectedTxReceipt.v);
});
});
Expand Down

0 comments on commit f88a023

Please sign in to comment.