From fb98cf90da9dd97a4e4da463d2bf48fb29b15aca Mon Sep 17 00:00:00 2001 From: Michal Zielenkiewicz Date: Thu, 27 Jun 2024 13:23:24 +0200 Subject: [PATCH] Add missing amount value to transactions list --- .changelog/1462.trivial.md | 1 + src/app/components/Transactions/ConsensusTransactions.tsx | 3 +-- src/oasis-nexus/api.ts | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changelog/1462.trivial.md diff --git a/.changelog/1462.trivial.md b/.changelog/1462.trivial.md new file mode 100644 index 0000000000..b27e06e6a9 --- /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 b31cd12bda..74305a634c 100644 --- a/src/app/components/Transactions/ConsensusTransactions.tsx +++ b/src/app/components/Transactions/ConsensusTransactions.tsx @@ -123,8 +123,7 @@ export const ConsensusTransactions: FC = ({ }, { align: TableCellAlign.Right, - // TODO: show RoundedBalance when API returns amount prop - content: <>-, + content: , key: 'value', }, ] diff --git a/src/oasis-nexus/api.ts b/src/oasis-nexus/api.ts index 48a26b745f..d57ff6f0d4 100644 --- a/src/oasis-nexus/api.ts +++ b/src/oasis-nexus/api.ts @@ -27,6 +27,7 @@ import { SearchScope } from '../types/searchScope' import { Ticker } from '../types/ticker' import { getRPCAccountBalances } from '../app/utils/getRPCAccountBalances' import { toChecksumAddress } from '@ethereumjs/util' +import { runtime } from '@oasisprotocol/client' export * from './generated/api' export type { RuntimeEvmBalance as Token } from './generated/api' @@ -180,6 +181,10 @@ export const useGetConsensusTransactions: typeof generated.useGetConsensusTransa network, layer: Layer.consensus, ticker, + body: { + ...tx.body, + amount: tx.body.amount ? fromBaseUnits(tx.body.amount, consensusDecimals) : undefined, + }, } }), }