Skip to content

Commit be9ddc2

Browse files
committed
Expose bitcoin finality
1 parent ddee04d commit be9ddc2

File tree

4 files changed

+26
-0
lines changed

4 files changed

+26
-0
lines changed

types/api/block.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ export interface Block {
3636
bitcoin_merged_mining_merkle_proof?: string | null;
3737
hash_for_merged_mining?: string | null;
3838
minimum_gas_price?: string | null;
39+
// HEMI FIELDS
40+
btc_finality?: number;
3941
}
4042

4143
export interface BlocksResponse {

types/api/transaction.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ export type Transaction = {
7979
zkevm_batch_number?: number;
8080
zkevm_status?: typeof ZKEVM_L2_TX_STATUSES[number];
8181
zkevm_sequence_hash?: string;
82+
// Hemi fields
83+
btc_finality?: number;
8284
}
8385

8486
export const ZKEVM_L2_TX_STATUSES = [ 'Confirmed by Sequencer', 'L1 Confirmed' ];

ui/block/BlockDetails.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,17 @@ const BlockDetails = ({ query }: Props) => {
166166
>
167167
<DetailsTimestamp timestamp={ data.timestamp } isLoading={ isPlaceholderData }/>
168168
</DetailsInfoItem>
169+
{ data.btc_finality && (
170+
<DetailsInfoItem
171+
title="Bitcoin finality"
172+
hint="Number of Bitcoin block confirmations protecting this block."
173+
isLoading={ isPlaceholderData }
174+
>
175+
<Skeleton isLoaded={ !isPlaceholderData }>
176+
{ data.btc_finality }
177+
</Skeleton>
178+
</DetailsInfoItem>
179+
) }
169180
<DetailsInfoItem
170181
title="Transactions"
171182
hint="The number of transactions in the block"

ui/tx/details/TxInfo.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,17 @@ const TxInfo = ({ data, isLoading, socketStatus }: Props) => {
226226
) }
227227
</DetailsInfoItem>
228228
) }
229+
{ data.btc_finality && (
230+
<DetailsInfoItem
231+
title="Bitcoin finality"
232+
hint="Number of Bitcoin block confirmations protecting this transaction."
233+
isLoading={ isLoading }
234+
>
235+
<Skeleton isLoaded={ !isLoading }>
236+
{ data.btc_finality }
237+
</Skeleton>
238+
</DetailsInfoItem>
239+
) }
229240
{ data.execution_node && (
230241
<DetailsInfoItem
231242
title="Kettle"

0 commit comments

Comments
 (0)