Skip to content

Commit

Permalink
Merge pull request #1716 from oasisprotocol/ml/fix-display-consensus-…
Browse files Browse the repository at this point in the history
…transaction-fee

Fix display of consensus transaction fee
  • Loading branch information
lubej authored Jan 29, 2025
2 parents 05f23c3 + c86b1c1 commit fee3ca0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .changelog/1716.bugfix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix display of consensus transaction fee
8 changes: 6 additions & 2 deletions src/app/pages/ConsensusTransactionDetailPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ import { getPreciseNumberFormat } from 'locales/getPreciseNumberFormat'
import { CurrentFiatValue } from '../../components/CurrentFiatValue'
import { ConsensusTransactionEvents } from '../../components/Transactions/ConsensusTransactionEvents'
import { AllTokenPrices, useAllTokenPrices } from 'coin-gecko/api'
import { getFiatCurrencyForScope } from '../../../config'
import { consensusDecimals, getFiatCurrencyForScope } from '../../../config'
import { useWantedTransaction } from '../../hooks/useWantedTransaction'
import { MultipleTransactionsWarning } from '../../components/Transactions/MultipleTransactionsWarning'
import { DashboardLink } from '../ParatimeDashboardPage/DashboardLink'
import { fromBaseUnits } from '../../utils/number-utils'

const StyledDescriptionDetails = styled('dd')({
'&&': { padding: 0 },
Expand Down Expand Up @@ -166,7 +167,10 @@ export const ConsensusTransactionDetailView: FC<{
)}
<dt>{t('common.fee')}</dt>
<dd>
<RoundedBalance value={transaction.fee} ticker={transaction.ticker} />
{t('common.valueInToken', {
...getPreciseNumberFormat(fromBaseUnits(transaction.fee, consensusDecimals)),
ticker: transaction.ticker,
})}
</dd>

{/* TODO: gasUsed field will be available for Nexus with the next oasis-core release */}
Expand Down

0 comments on commit fee3ca0

Please sign in to comment.