diff --git a/.changelog/1462.trivial.md b/.changelog/1462.trivial.md new file mode 100644 index 000000000..b27e06e6a --- /dev/null +++ b/.changelog/1462.trivial.md @@ -0,0 +1 @@ +Show missing columns in Consensus transactions list diff --git a/src/app/components/Transactions/ConsensusTransactions.tsx b/src/app/components/Transactions/ConsensusTransactions.tsx index 7c5c59938..74305a634 100644 --- a/src/app/components/Transactions/ConsensusTransactions.tsx +++ b/src/app/components/Transactions/ConsensusTransactions.tsx @@ -56,73 +56,82 @@ 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, + content: , + key: 'value', + }, + ] + : []), + ], + highlight: transaction.markAsNew, + } + }) return (