Add block total tx count info
This commit is contained in:
parent
5b5791236f
commit
07e496f476
|
@ -229,7 +229,7 @@ const Details: React.FC<DetailsProps> = ({
|
|||
<InfoRow title="Nonce">{txData.nonce}</InfoRow>
|
||||
<InfoRow title="Position in Block">
|
||||
<span className="rounded px-2 py-1 bg-gray-100 text-gray-500 text-xs">
|
||||
{txData.transactionIndex}
|
||||
{txData.transactionIndex} / {txData.blockTransactionCount - 1}
|
||||
</span>
|
||||
</InfoRow>
|
||||
<InfoRow title="Input Data">
|
||||
|
|
|
@ -40,6 +40,7 @@ export type TransactionData = {
|
|||
status: boolean;
|
||||
blockNumber: number;
|
||||
transactionIndex: number;
|
||||
blockTransactionCount: number;
|
||||
confirmations: number;
|
||||
timestamp: number;
|
||||
miner?: string;
|
||||
|
|
|
@ -149,6 +149,7 @@ export const useTxData = (
|
|||
status: _receipt.status === 1,
|
||||
blockNumber: _receipt.blockNumber,
|
||||
transactionIndex: _receipt.transactionIndex,
|
||||
blockTransactionCount: _block.transactions.length,
|
||||
confirmations: _receipt.confirmations,
|
||||
timestamp: _block.timestamp,
|
||||
miner: _block.miner,
|
||||
|
|
Loading…
Reference in New Issue