From 0c6fa5a002bc0b0d1bc16c7b616d240c2c2efecb Mon Sep 17 00:00:00 2001 From: Matej Lubej Date: Tue, 10 Sep 2024 22:28:27 +0200 Subject: [PATCH] Add tooltip for transaction gas price explanation --- src/app/pages/RuntimeTransactionDetailPage/index.tsx | 6 ++++++ src/locales/en/translation.json | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/pages/RuntimeTransactionDetailPage/index.tsx b/src/app/pages/RuntimeTransactionDetailPage/index.tsx index 12780a25c9..d5ef423a4a 100644 --- a/src/app/pages/RuntimeTransactionDetailPage/index.tsx +++ b/src/app/pages/RuntimeTransactionDetailPage/index.tsx @@ -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 @@ -322,6 +324,10 @@ export const RuntimeTransactionDetailView: FC<{ ...getPreciseNumberFormat(convertToNano(gasPrice)), ticker: `n${tickerName}`, })} +   + + + )} diff --git a/src/locales/en/translation.json b/src/locales/en/translation.json index 2d733f2c53..1542a87bf1 100644 --- a/src/locales/en/translation.json +++ b/src/locales/en/translation.json @@ -459,7 +459,8 @@ "txEncrypted": "This transaction is encrypted.", "txNotEncrypted": "This transaction is not 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": {