diff --git a/explorer/src/components/block/BlockOverviewCard.tsx b/explorer/src/components/block/BlockOverviewCard.tsx index 514f1d72f..162f3f58f 100644 --- a/explorer/src/components/block/BlockOverviewCard.tsx +++ b/explorer/src/components/block/BlockOverviewCard.tsx @@ -98,6 +98,14 @@ export function BlockOverviewCard({ {block.previousBlockhash} + {confirmedBlock.data.child && ( + + Child Slot + + + + + )} Processed Transactions diff --git a/explorer/src/providers/block.tsx b/explorer/src/providers/block.tsx index facf9102f..724132bb2 100644 --- a/explorer/src/providers/block.tsx +++ b/explorer/src/providers/block.tsx @@ -17,6 +17,7 @@ export enum ActionType { type Block = { block?: BlockResponse; + child?: number; }; type State = Cache.State; @@ -71,13 +72,14 @@ export async function fetchBlock( let data: Block | undefined = undefined; try { - const connection = new Connection(url, "finalized"); - const block = await connection.getBlock(Number(key)); + const connection = new Connection(url, "confirmed"); + const block = await connection.getBlock(key); + const child = (await connection.getBlocks(key + 1, key + 100)).shift(); if (block === null) { data = {}; status = FetchStatus.Fetched; } else { - data = { block }; + data = { block, child }; status = FetchStatus.Fetched; } } catch (err) {