Skip to content

Commit

Permalink
Add tooltip for transaction gas price explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
lubej committed Sep 10, 2024
1 parent 9b82575 commit 0c6fa5a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/app/pages/RuntimeTransactionDetailPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ import { base64ToHex } from '../../utils/helpers'
import { DappBanner } from '../../components/DappBanner'
import { getFiatCurrencyForScope, showFiatValues } from '../../../config'
import { convertToNano, getGasPrice } from '../../utils/number-utils'
import Tooltip from '@mui/material/Tooltip'
import HelpIcon from '@mui/icons-material/Help'

type TransactionSelectionResult = {
wantedTransaction?: RuntimeTransaction
Expand Down Expand Up @@ -322,6 +324,10 @@ export const RuntimeTransactionDetailView: FC<{
...getPreciseNumberFormat(convertToNano(gasPrice)),
ticker: `n${tickerName}`,
})}
&nbsp;
<Tooltip title={t('transaction.tooltips.gasPriceExplanation')}>
<HelpIcon />
</Tooltip>
</dd>
</>
)}
Expand Down
3 changes: 2 additions & 1 deletion src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,8 @@
"txEncrypted": "This transaction is encrypted.",
"txNotEncrypted": "This transaction is <strong>not</strong> encrypted.",
"senderTooltipUnavailable": "Sender not available in selected address format",
"recipientTooltipUnavailable": "Recipient not available in selected address format"
"recipientTooltipUnavailable": "Recipient not available in selected address format",
"gasPriceExplanation": "For each transaction, you're charged a certain amount for the gas you use and is measured in nano ROSE(Gwei)."
}
},
"runtimeEvent": {
Expand Down

0 comments on commit 0c6fa5a

Please sign in to comment.