diff --git a/src/hooks/mining/useTransactions.ts b/src/hooks/mining/useTransactions.ts index ed81b00bd..f757f5233 100644 --- a/src/hooks/mining/useTransactions.ts +++ b/src/hooks/mining/useTransactions.ts @@ -33,13 +33,7 @@ export default function useFetchTx() { const txs = await invoke('get_transaction_history'); const sortedTransactions = txs.sort((a, b) => b.timestamp - a.timestamp); const mapped = sortedTransactions?.map((tx) => { - const blockHeight = tx.message.split(': ')[1]; - - if (blockHeight) { - return { ...tx, blockHeight }; - } - - return tx; + return { ...tx, blockHeight: tx.mined_in_block_height }; }) as Transaction[]; if (mapped?.length) { diff --git a/src/types/app-status.ts b/src/types/app-status.ts index 84737ed6d..79de36529 100644 --- a/src/types/app-status.ts +++ b/src/types/app-status.ts @@ -113,6 +113,7 @@ export interface TransactionInfo { timestamp: number; message: string; payment_id: string; + mined_in_block_height?: number; } export interface P2poolStatsResult {