From eb39c51ede1a48656b58f4f80543e47a1bd3962a Mon Sep 17 00:00:00 2001 From: Jyoti Puri Date: Wed, 26 Jan 2022 07:04:58 +0530 Subject: [PATCH] Using new graph images for edit gas fee popover (#13382) --- app/_locales/en/messages.json | 9 +++++++ app/images/curve-high.svg | 26 ++++++++++++++++++- app/images/curve-low.svg | 21 ++++++++++++++- app/images/curve-medium.svg | 17 +++++++++++- .../edit-gas-tooltip/edit-gas-tooltip.js | 11 +++++++- 5 files changed, 80 insertions(+), 4 deletions(-) diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 8ccd962df..fde592a29 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -656,6 +656,15 @@ "currentlyUnavailable": { "message": "Unavailable on this network" }, + "curveHighGasEstimate": { + "message": "Aggressive gas estimate graph" + }, + "curveLowGasEstimate": { + "message": "Low gas estimate graph" + }, + "curveMediumGasEstimate": { + "message": "Market gas estimate graph" + }, "custom": { "message": "Advanced" }, diff --git a/app/images/curve-high.svg b/app/images/curve-high.svg index f5c918636..bd6d8d0ce 100644 --- a/app/images/curve-high.svg +++ b/app/images/curve-high.svg @@ -1 +1,25 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/images/curve-low.svg b/app/images/curve-low.svg index fee21216e..9f98826ea 100644 --- a/app/images/curve-low.svg +++ b/app/images/curve-low.svg @@ -1 +1,20 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + diff --git a/app/images/curve-medium.svg b/app/images/curve-medium.svg index c3cc1d2aa..9a454bc99 100644 --- a/app/images/curve-medium.svg +++ b/app/images/curve-medium.svg @@ -1 +1,16 @@ - \ No newline at end of file + + + + + + + + + + + + + + + + diff --git a/ui/components/app/edit-gas-fee-popover/edit-gas-tooltip/edit-gas-tooltip.js b/ui/components/app/edit-gas-fee-popover/edit-gas-tooltip/edit-gas-tooltip.js index a97da2db5..0a80a8c63 100644 --- a/ui/components/app/edit-gas-fee-popover/edit-gas-tooltip/edit-gas-tooltip.js +++ b/ui/components/app/edit-gas-fee-popover/edit-gas-tooltip/edit-gas-tooltip.js @@ -79,6 +79,15 @@ const EditGasToolTip = ({ } }, [editGasMode, estimateGreaterThanGasUse, priorityLevel, transaction, t]); + let imgAltText; + if (priorityLevel === PRIORITY_LEVELS.LOW) { + imgAltText = t('curveLowGasEstimate'); + } else if (priorityLevel === PRIORITY_LEVELS.MEDIUM) { + imgAltText = t('curveMediumGasEstimate'); + } else if (priorityLevel === PRIORITY_LEVELS.HIGH) { + imgAltText = t('curveHighGasEstimate'); + } + return (
{priorityLevel !== PRIORITY_LEVELS.CUSTOM && @@ -88,7 +97,7 @@ const EditGasToolTip = ({ editGasMode === EDIT_GAS_MODES.SWAPS ) && !estimateGreaterThanGasUse ? ( - + {imgAltText} ) : null} {toolTipMessage && (