diff --git a/src/transaction/Details.tsx b/src/transaction/Details.tsx index 86b0c0e..1a1cd64 100644 --- a/src/transaction/Details.tsx +++ b/src/transaction/Details.tsx @@ -16,6 +16,7 @@ import Timestamp from "../components/Timestamp"; import InternalTransactionOperation from "../components/InternalTransactionOperation"; import MethodName from "../components/MethodName"; import TransactionType from "../components/TransactionType"; +import RewardSplit from "./RewardSplit"; import GasValue from "../components/GasValue"; import FormattedBalance from "../components/FormattedBalance"; import TokenTransferItem from "../TokenTransferItem"; @@ -33,198 +34,213 @@ const Details: React.FC = ({ txData, internalOps, sendsEthToMiner, -}) => ( - - -
- {txData.transactionHash} - -
-
- - {txData.status ? ( - - - Success - - ) : ( - - - Fail - - )} - - -
- - -
-
- - - - -
- - - - -
-
- - {txData.to ? ( -
- - - - -
- ) : ( -
- - - - -
- )} - {internalOps && ( -
- {internalOps.map((op, i) => ( - - ))} -
- )} -
- - - - {txData.tokenTransfers.length > 0 && ( - -
- {txData.tokenTransfers.map((t, i) => ( - - ))} +}) => { + const hasEIP1559 = + txData.blockBaseFeePerGas !== undefined && + txData.blockBaseFeePerGas !== null; + + return ( + + +
+ {txData.transactionHash} +
- )} - - - {ethers.utils.formatEther(txData.value)} Ether - - - - Type ( - - EIP-2718 - - ) - - } - > - - - {txData.blockBaseFeePerGas && ( - - - {" "} - Gwei ( - {" "} - wei) - - - )} - {txData.type === 2 && ( - <> - - - Ether ( - {" "} - Gwei) + + {txData.status ? ( + + + Success - - - - Ether ( - Gwei) - - - - )} - - Ether - - -
- - Ether ( - Gwei) - - {sendsEthToMiner && ( - - Flashbots + ) : ( + + + Fail )} -
-
- -
-
- /{" "} - + + +
+ +
- + + + + +
+ + + + +
+
+ + {txData.to ? ( +
+ + + + +
+ ) : ( +
+ + + + +
+ )} + {internalOps && ( +
+ {internalOps.map((op, i) => ( + + ))} +
+ )} +
+ + + + {txData.tokenTransfers.length > 0 && ( + +
+ {txData.tokenTransfers.map((t, i) => ( + + ))} +
+
+ )} + + + {ethers.utils.formatEther(txData.value)} Ether + + + + Type ( + + EIP-2718 + + ) + + } + > + + + {hasEIP1559 && ( + + + {" "} + Gwei ( + {" "} + wei) + + + )} + {txData.type === 2 && ( + <> + + + Ether ( + {" "} + Gwei) + + + + + Ether ( + {" "} + Gwei) + + + + )} + +
+
+ Ether +
+ {hasEIP1559 && } +
+
+ +
+ + Ether ( + Gwei) + + {sendsEthToMiner && ( + + Flashbots + + )} +
+
+ +
+
+ /{" "} + +
+ +
+
+ N/A + {txData.nonce} + + + {txData.transactionIndex} + + + +