From 344f0946063470dc6d5bb00223694083d83efe3c Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Wed, 30 Oct 2024 03:58:48 +0000 Subject: [PATCH] fix --- test/e2e/json-rpc/eth_call.spec.ts | 4 ++-- .../transaction-alerts/transaction-alerts.stories.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/e2e/json-rpc/eth_call.spec.ts b/test/e2e/json-rpc/eth_call.spec.ts index 0cb71e89e2a3..dfd40833bb62 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( + const balanceOf = `0x${Buffer.from(keccak256( Buffer.from('balanceOf(address)'), - ).toString()}`; + )).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; };