From c21a2a27872be8a9507a373c42b977d630abc931 Mon Sep 17 00:00:00 2001 From: Timidan Date: Thu, 23 Apr 2026 14:56:46 +0100 Subject: [PATCH] feat: add refHash support for transaction hash replay in SimulationResultsPage and TransactionSummary --- src/components/SimulationResultsPage.tsx | 4 ++++ src/components/TopBar.tsx | 9 +++++++-- .../simulation-results/TransactionSummary.tsx | 13 +++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/components/SimulationResultsPage.tsx b/src/components/SimulationResultsPage.tsx index 0880d73..3072010 100644 --- a/src/components/SimulationResultsPage.tsx +++ b/src/components/SimulationResultsPage.tsx @@ -97,6 +97,9 @@ const SimulationResultsPage: React.FC = (props) => { const statusIcon = result.success ? "\u2713" : "\u2717"; const hash = id || Date.now().toString(); + const isTxHashReplay = contractContext?.simulationOrigin === "tx-hash-replay"; + const replayedHash = isTxHashReplay ? contractContext?.replayTxHash : undefined; + const refHash = replayedHash && replayedHash !== hash ? replayedHash : undefined; const network = contractContext?.networkName || "Ethereum"; const blockNumber = result.blockNumber ? String(result.blockNumber) : "\u2014"; @@ -139,6 +142,7 @@ const SimulationResultsPage: React.FC = (props) => { = ({ className, )} > -
+ = ({ > HEXKIT -
+
= ({ hash, + refHash, network, statusColor, statusIcon, @@ -121,6 +124,16 @@ export const TransactionSummary: React.FC = ({
+ {refHash && ( +
+ Ref Hash +
+ {refHash} + +
+
+ )} +
Network