Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tooltip for transaction gas price explanation #1533

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changelog/1533.trivial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add tooltip for transaction gas price explanation
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)."
Copy link
Contributor

@buberdds buberdds Sep 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be ...measured in nano {{ ticker }}

Why we say it is gwei? nanoROSE (or whatever will be used here nEUROe etc) and GWEI are not interchangeable or equal.

}
},
"runtimeEvent": {
Expand Down
Loading