From 9dd5af35238cb32f779eeabd1b25c4a08c8cb666 Mon Sep 17 00:00:00 2001 From: Jyoti Puri Date: Mon, 6 Dec 2021 21:10:20 +0530 Subject: [PATCH] Implementing design feedbacks in EIP-1559 V2 flow (#12943) --- app/_locales/en/messages.json | 2 +- .../base-fee-input/base-fee-input.js | 6 +----- .../edit-gas-fee-popover.test.js | 2 +- .../edit-gas-item/edit-gas-item.js | 14 +++++++------- .../edit-gas-item/edit-gas-item.test.js | 7 ------- .../edit-gas-item/index.scss | 19 +++++++++++-------- .../app/edit-gas-fee-popover/index.scss | 4 ++-- .../app/transaction-detail/index.scss | 4 ++++ .../transaction-detail.component.js | 7 +++++-- 9 files changed, 32 insertions(+), 33 deletions(-) diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index f00a10f6a..a6e5d5ac2 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -167,7 +167,7 @@ "message": "Advanced" }, "advancedBaseGasFeeToolTip": { - "message": "Any difference between your max base fee and the current base fee will be refunded after completion." + "message": "When your transaction gets included in the block, any difference between your max base fee and the actual base fee will be refunded. Total amount is calculated as max base fee (in GWEI) * gas limit." }, "advancedGasFeeModalTitle": { "message": "Advanced gas fee" diff --git a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/base-fee-input/base-fee-input.js b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/base-fee-input/base-fee-input.js index 1e7739bf3..194db3026 100644 --- a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/base-fee-input/base-fee-input.js +++ b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/base-fee-input/base-fee-input.js @@ -137,11 +137,7 @@ const BaseFeeInput = () => { } value={editingInGwei ? maxBaseFeeGWEI : maxBaseFeeMultiplier} - detailText={ - editingInGwei - ? `${maxBaseFeeMultiplier}x ${`≈ ${baseFeeInFiat}`}` - : `${maxBaseFeeGWEI} GWEI ${`≈ ${baseFeeInFiat}`}` - } + detailText={`≈ ${baseFeeInFiat}`} numeric /> { describe('EditGasFeePopover', () => { it('should renders low / medium / high options', () => { - render(); + render({ dappSuggestedGasFees: {} }); expect(screen.queryByText('🐢')).toBeInTheDocument(); expect(screen.queryByText('🦊')).toBeInTheDocument(); diff --git a/ui/components/app/edit-gas-fee-popover/edit-gas-item/edit-gas-item.js b/ui/components/app/edit-gas-fee-popover/edit-gas-item/edit-gas-item.js index 0aac305ca..0b1a2a814 100644 --- a/ui/components/app/edit-gas-fee-popover/edit-gas-item/edit-gas-item.js +++ b/ui/components/app/edit-gas-fee-popover/edit-gas-item/edit-gas-item.js @@ -97,18 +97,18 @@ const EditGasItem = ({ priorityLevel }) => { } }; + if ( + priorityLevel === PRIORITY_LEVELS.DAPP_SUGGESTED && + !dappSuggestedGasFees + ) { + return null; + } + return ( - {estimateUsed === 'custom' && onEdit && ( - )}