Skip to content

Commit fee3ca0

Browse files
authored
Merge pull request #1716 from oasisprotocol/ml/fix-display-consensus-transaction-fee
Fix display of consensus transaction fee
2 parents 05f23c3 + c86b1c1 commit fee3ca0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changelog/1716.bugfix.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix display of consensus transaction fee

src/app/pages/ConsensusTransactionDetailPage/index.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,11 @@ import { getPreciseNumberFormat } from 'locales/getPreciseNumberFormat'
2222
import { CurrentFiatValue } from '../../components/CurrentFiatValue'
2323
import { ConsensusTransactionEvents } from '../../components/Transactions/ConsensusTransactionEvents'
2424
import { AllTokenPrices, useAllTokenPrices } from 'coin-gecko/api'
25-
import { getFiatCurrencyForScope } from '../../../config'
25+
import { consensusDecimals, getFiatCurrencyForScope } from '../../../config'
2626
import { useWantedTransaction } from '../../hooks/useWantedTransaction'
2727
import { MultipleTransactionsWarning } from '../../components/Transactions/MultipleTransactionsWarning'
2828
import { DashboardLink } from '../ParatimeDashboardPage/DashboardLink'
29+
import { fromBaseUnits } from '../../utils/number-utils'
2930

3031
const StyledDescriptionDetails = styled('dd')({
3132
'&&': { padding: 0 },
@@ -166,7 +167,10 @@ export const ConsensusTransactionDetailView: FC<{
166167
)}
167168
<dt>{t('common.fee')}</dt>
168169
<dd>
169-
<RoundedBalance value={transaction.fee} ticker={transaction.ticker} />
170+
{t('common.valueInToken', {
171+
...getPreciseNumberFormat(fromBaseUnits(transaction.fee, consensusDecimals)),
172+
ticker: transaction.ticker,
173+
})}
170174
</dd>
171175

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

0 commit comments

Comments
 (0)