Skip to content

Commit 0c6fa5a

Browse files
committed
Add tooltip for transaction gas price explanation
1 parent 9b82575 commit 0c6fa5a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/app/pages/RuntimeTransactionDetailPage/index.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ import { base64ToHex } from '../../utils/helpers'
3737
import { DappBanner } from '../../components/DappBanner'
3838
import { getFiatCurrencyForScope, showFiatValues } from '../../../config'
3939
import { convertToNano, getGasPrice } from '../../utils/number-utils'
40+
import Tooltip from '@mui/material/Tooltip'
41+
import HelpIcon from '@mui/icons-material/Help'
4042

4143
type TransactionSelectionResult = {
4244
wantedTransaction?: RuntimeTransaction
@@ -322,6 +324,10 @@ export const RuntimeTransactionDetailView: FC<{
322324
...getPreciseNumberFormat(convertToNano(gasPrice)),
323325
ticker: `n${tickerName}`,
324326
})}
327+
&nbsp;
328+
<Tooltip title={t('transaction.tooltips.gasPriceExplanation')}>
329+
<HelpIcon />
330+
</Tooltip>
325331
</dd>
326332
</>
327333
)}

src/locales/en/translation.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,8 @@
459459
"txEncrypted": "This transaction is encrypted.",
460460
"txNotEncrypted": "This transaction is <strong>not</strong> encrypted.",
461461
"senderTooltipUnavailable": "Sender not available in selected address format",
462-
"recipientTooltipUnavailable": "Recipient not available in selected address format"
462+
"recipientTooltipUnavailable": "Recipient not available in selected address format",
463+
"gasPriceExplanation": "For each transaction, you're charged a certain amount for the gas you use and is measured in nano ROSE(Gwei)."
463464
}
464465
},
465466
"runtimeEvent": {

0 commit comments

Comments
 (0)