diff --git a/test/e2e/json-rpc/eth_call.spec.ts b/test/e2e/json-rpc/eth_call.spec.ts index 0cb71e89e2a3..df94d1ce4ead 100644 --- a/test/e2e/json-rpc/eth_call.spec.ts +++ b/test/e2e/json-rpc/eth_call.spec.ts @@ -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', diff --git a/ui/pages/confirmations/components/transaction-alerts/transaction-alerts.stories.js b/ui/pages/confirmations/components/transaction-alerts/transaction-alerts.stories.js index c6e286e1b948..c8fd3d6e81bb 100644 --- a/ui/pages/confirmations/components/transaction-alerts/transaction-alerts.stories.js +++ b/ui/pages/confirmations/components/transaction-alerts/transaction-alerts.stories.js @@ -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; };