From be9df7df1da2f02fd6626a346e0f942eb98332ec 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 --- .changelog/1533.trivial.md | 1 + src/app/pages/RuntimeTransactionDetailPage/index.tsx | 6 ++++++ src/locales/en/translation.json | 3 ++- 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .changelog/1533.trivial.md diff --git a/.changelog/1533.trivial.md b/.changelog/1533.trivial.md new file mode 100644 index 000000000..1b7165703 --- /dev/null +++ b/.changelog/1533.trivial.md @@ -0,0 +1 @@ +Add tooltip for transaction gas price explanation diff --git a/src/app/pages/RuntimeTransactionDetailPage/index.tsx b/src/app/pages/RuntimeTransactionDetailPage/index.tsx index 12780a25c..d5ef423a4 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 2d733f2c5..1542a87bf 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": {