1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 12:29:06 +01:00

Gas Timing with Negative attitude should be bold with tooltip (#11772)

This commit is contained in:
David Walsh 2021-08-14 17:46:55 -05:00 committed by GitHub
parent b5baa6c1d1
commit 01fd2a609e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 7 deletions

View File

@ -714,6 +714,9 @@
"editGasTooLowTooltip": {
"message": "Your max fee or max priority fee may be low for current market conditions. We don't know when (or if) your transaction will be processed. "
},
"editGasTooLowWarningTooltip": {
"message": "This lowers your maximum fee but if network traffic increases your transaction may be delayed or fail."
},
"editNonceField": {
"message": "Edit Nonce"
},

View File

@ -126,7 +126,6 @@ export default function GasTiming({
let text = '';
let attitude = 'positive';
let fontWeight = FONT_WEIGHT.NORMAL;
// Anything medium or faster is positive
if (
@ -159,7 +158,6 @@ export default function GasTiming({
customEstimatedTime === 'unknown' ||
customEstimatedTime?.upperTimeBound === 'unknown'
) {
fontWeight = FONT_WEIGHT.BOLD;
text = unknownProcessingTimeText;
} else {
text = t('gasTimingNegative', [
@ -167,16 +165,23 @@ export default function GasTiming({
]);
}
} else {
text = t('gasTimingNegative', [
text = (
<>
{t('gasTimingNegative', [
toHumanReadableTime(low.maxWaitTimeEstimate, t),
]);
])}
<InfoTooltip
position="top"
contentText={t('editGasTooLowWarningTooltip')}
/>
</>
);
}
}
return (
<Typography
variant={TYPOGRAPHY.H7}
fontWeight={fontWeight}
className={classNames('gas-timing', {
[`gas-timing--${attitude}`]: attitude,
})}

View File

@ -11,6 +11,7 @@
&--negative {
color: $error-1;
font-weight: bold;
}
.info-tooltip {

View File

@ -52,7 +52,7 @@ exports[`FeeCard renders the component with EIP-1559 enabled 2`] = `
class="fee-card__info-tooltip-container"
>
<div
aria-describedby="tippy-tooltip-6"
aria-describedby="tippy-tooltip-7"
class="info-tooltip__tooltip-container"
data-original-title="null"
data-tooltipped=""