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="Nonce">{txData.nonce}</InfoRow>
|
||||||
<InfoRow title="Position in Block">
|
<InfoRow title="Position in Block">
|
||||||
<span className="rounded px-2 py-1 bg-gray-100 text-gray-500 text-xs">
|
<span className="rounded px-2 py-1 bg-gray-100 text-gray-500 text-xs">
|
||||||
{txData.transactionIndex}
|
{txData.transactionIndex} / {txData.blockTransactionCount - 1}
|
||||||
</span>
|
</span>
|
||||||
</InfoRow>
|
</InfoRow>
|
||||||
<InfoRow title="Input Data">
|
<InfoRow title="Input Data">
|
||||||
|
|
|
@ -40,6 +40,7 @@ export type TransactionData = {
|
||||||
status: boolean;
|
status: boolean;
|
||||||
blockNumber: number;
|
blockNumber: number;
|
||||||
transactionIndex: number;
|
transactionIndex: number;
|
||||||
|
blockTransactionCount: number;
|
||||||
confirmations: number;
|
confirmations: number;
|
||||||
timestamp: number;
|
timestamp: number;
|
||||||
miner?: string;
|
miner?: string;
|
||||||
|
|
|
@ -149,6 +149,7 @@ export const useTxData = (
|
||||||
status: _receipt.status === 1,
|
status: _receipt.status === 1,
|
||||||
blockNumber: _receipt.blockNumber,
|
blockNumber: _receipt.blockNumber,
|
||||||
transactionIndex: _receipt.transactionIndex,
|
transactionIndex: _receipt.transactionIndex,
|
||||||
|
blockTransactionCount: _block.transactions.length,
|
||||||
confirmations: _receipt.confirmations,
|
confirmations: _receipt.confirmations,
|
||||||
timestamp: _block.timestamp,
|
timestamp: _block.timestamp,
|
||||||
miner: _block.miner,
|
miner: _block.miner,
|
||||||
|
|
Loading…
Reference in New Issue