Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
legobeat committed Oct 30, 2024
1 parent 689d3d8 commit 7623dfa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions test/e2e/json-rpc/eth_call.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ describe('eth_call', function () {

// eth_call
await driver.openNewPage(`http://127.0.0.1:8080`);
const balanceOf = `0x${keccak256(
Buffer.from('balanceOf(address)'),
).toString()}`;
const balanceOf = `0x${Buffer.from(
keccak256(Buffer.from('balanceOf(address)')),
).toString('hex')}`;
const walletAddress = '0x5cfe73b6021e818b776b421b1c4db2474086a7e1';
const request = JSON.stringify({
jsonrpc: '2.0',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const customTransaction = ({
};
// just simulate hash if not provided
if (!props?.hash) {
tx.hash = `0x${keccak256(Buffer.from(JSON.stringify(tx))).toString('hex')}`;
tx.hash = `0x${Buffer.from(keccak256(Buffer.from(JSON.stringify(tx)))).toString('hex')}`;
}
return tx;
};
Expand Down

0 comments on commit 7623dfa

Please sign in to comment.