diff --git a/packages/ws-server/tests/acceptance/getTransactionByHash.spec.ts b/packages/ws-server/tests/acceptance/getTransactionByHash.spec.ts index 46f69fd54..4b1f4d0a9 100644 --- a/packages/ws-server/tests/acceptance/getTransactionByHash.spec.ts +++ b/packages/ws-server/tests/acceptance/getTransactionByHash.spec.ts @@ -117,8 +117,9 @@ 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); + // Must convert to quantity to compare and remove leading zeros + 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); }); }); @@ -136,8 +137,9 @@ 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); + // Must convert to quantity to compare and remove leading zeros + 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); }); });