Skip to content

Commit

Permalink
Add missing amount value to transactions list
Browse files Browse the repository at this point in the history
  • Loading branch information
buberdds committed Jun 27, 2024
1 parent 5b06be3 commit fb98cf9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .changelog/1462.trivial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Show missing columns in Consensus transactions list
3 changes: 1 addition & 2 deletions src/app/components/Transactions/ConsensusTransactions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ export const ConsensusTransactions: FC<ConsensusTransactionsProps> = ({
},
{
align: TableCellAlign.Right,
// TODO: show RoundedBalance when API returns amount prop
content: <>-</>,
content: <RoundedBalance value={transaction.body.amount} ticker={transaction.ticker} />,
key: 'value',
},
]
Expand Down
5 changes: 5 additions & 0 deletions src/oasis-nexus/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Check warning on line 30 in src/oasis-nexus/api.ts

View workflow job for this annotation

GitHub Actions / lint

'runtime' is defined but never used

export * from './generated/api'
export type { RuntimeEvmBalance as Token } from './generated/api'
Expand Down Expand Up @@ -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,
},
}
}),
}
Expand Down

0 comments on commit fb98cf9

Please sign in to comment.