From 5b06be3d9ecbfdc8979110ea95782e149dc43d85 Mon Sep 17 00:00:00 2001 From: Michal Zielenkiewicz Date: Thu, 27 Jun 2024 13:26:50 +0200 Subject: [PATCH] Add missing receiver to transactions list --- .../Transactions/ConsensusTransactions.tsx | 136 ++++++++++-------- 1 file changed, 73 insertions(+), 63 deletions(-) diff --git a/src/app/components/Transactions/ConsensusTransactions.tsx b/src/app/components/Transactions/ConsensusTransactions.tsx index 7c5c59938e..b31cd12bda 100644 --- a/src/app/components/Transactions/ConsensusTransactions.tsx +++ b/src/app/components/Transactions/ConsensusTransactions.tsx @@ -56,73 +56,83 @@ export const ConsensusTransactions: FC = ({ ] : []), ] - const tableRows = transactions?.map(transaction => ({ - key: `${transaction.hash}${transaction.index}`, - data: [ - { - content: , - key: 'success', - }, - { - content: , - key: 'hash', - }, - { - content: , - key: 'round', - }, - { - content: , - key: 'timestamp', - }, - ...(verbose - ? [ - { - content: , - key: 'method', - }, - { - align: TableCellAlign.Right, - content: ( - + + const tableRows = transactions?.map(transaction => { + const targetAddress = transaction.body.to || transaction.body.account + return { + key: `${transaction.hash}${transaction.index}`, + data: [ + { + content: , + key: 'success', + }, + { + content: , + key: 'hash', + }, + { + content: , + key: 'round', + }, + { + content: , + key: 'timestamp', + }, + ...(verbose + ? [ + { + content: , + key: 'method', + }, + { + align: TableCellAlign.Right, + content: ( + + + + ), + key: 'from', + }, + { + content: targetAddress ? ( - - ), - key: 'from', - }, - { - // TODO: show recipients address when props is added to API - content: <>-, - key: 'to', - }, - { - align: TableCellAlign.Right, - content: , - key: 'fee_amount', - }, - { - align: TableCellAlign.Right, - // TODO: show RoundedBalance when API returns amount prop - content: <>-, - key: 'value', - }, - ] - : []), - ], - highlight: transaction.markAsNew, - })) + ) : null, + key: 'to', + }, + { + align: TableCellAlign.Right, + content: , + key: 'fee_amount', + }, + { + align: TableCellAlign.Right, + // TODO: show RoundedBalance when API returns amount prop + content: <>-, + key: 'value', + }, + ] + : []), + ], + highlight: transaction.markAsNew, + } + }) return (