diff --git a/explorer/src/components/block/BlockOverviewCard.tsx b/explorer/src/components/block/BlockOverviewCard.tsx
index 5ad7dad2b..15279382c 100644
--- a/explorer/src/components/block/BlockOverviewCard.tsx
+++ b/explorer/src/components/block/BlockOverviewCard.tsx
@@ -46,7 +46,12 @@ export function BlockOverviewCard({
const { block, blockLeader, childSlot, childLeader, parentLeader } =
confirmedBlock.data;
- const committedTxs = block.transactions.filter((tx) => tx.meta?.err === null);
+ const showSuccessfulCount = block.transactions.every(
+ (tx) => tx.meta !== null
+ );
+ const successfulTxs = block.transactions.filter(
+ (tx) => tx.meta?.err === null
+ );
const epoch = clusterInfo?.epochSchedule.getEpoch(slot);
return (
@@ -153,12 +158,14 @@ export function BlockOverviewCard({
{block.transactions.length}
-
- Successful Transactions |
-
- {committedTxs.length}
- |
-
+ {showSuccessfulCount && (
+
+ Successful Transactions |
+
+ {successfulTxs.length}
+ |
+
+ )}
diff --git a/explorer/src/components/block/BlockProgramsCard.tsx b/explorer/src/components/block/BlockProgramsCard.tsx
index c1172f2fb..b1a70006a 100644
--- a/explorer/src/components/block/BlockProgramsCard.tsx
+++ b/explorer/src/components/block/BlockProgramsCard.tsx
@@ -53,6 +53,7 @@ export function BlockProgramsCard({ block }: { block: BlockResponse }) {
return 0;
});
+ const showSuccessRate = block.transactions.every((tx) => tx.meta !== null);
return (
<>
@@ -86,7 +87,9 @@ export function BlockProgramsCard({ block }: { block: BlockResponse }) {
% of Total |
Instruction Count |
% of Total |
- Success Rate |
+ {showSuccessRate && (
+ Success Rate |
+ )}
@@ -102,7 +105,9 @@ export function BlockProgramsCard({ block }: { block: BlockResponse }) {
{((100 * txFreq) / totalTransactions).toFixed(2)}% |
{ixFreq} |
{((100 * ixFreq) / totalInstructions).toFixed(2)}% |
- {((100 * successes) / txFreq).toFixed(0)}% |
+ {showSuccessRate && (
+ {((100 * successes) / txFreq).toFixed(0)}% |
+ )}
);
})}