From dde9e7fdd818d9ead68c87503a63e7eea5b34ecb Mon Sep 17 00:00:00 2001 From: Tuditi Date: Wed, 15 May 2024 14:07:51 +0200 Subject: [PATCH] chore: merge required and slow --- .../components/SetTransactionFeeMenu.svelte | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/packages/desktop/views/dashboard/send-flow/views/components/SetTransactionFeeMenu.svelte b/packages/desktop/views/dashboard/send-flow/views/components/SetTransactionFeeMenu.svelte index f1cf88233f..dbcd463343 100644 --- a/packages/desktop/views/dashboard/send-flow/views/components/SetTransactionFeeMenu.svelte +++ b/packages/desktop/views/dashboard/send-flow/views/components/SetTransactionFeeMenu.svelte @@ -20,25 +20,16 @@ $: items = setItems(gasPrices, selectedGasSpeed) function setItems(gasPrices: IGasPricesBySpeed, selectedGasSpeed: GasSpeed): IMenuItem[] { + const gasPriceSlow = gasPrices.required > (gasPrices.slow ?? 0) ? gasPrices.required : gasPrices.slow const _items = [ { - icon: IconName.ClockPlus, - title: localize('general.required'), - subtitle: formatGasFee(gasUnit, gasPrices.required), - selected: selectedGasSpeed === GasSpeed.Required, - onClick: () => onChooseGasPriceClick(GasSpeed.Required), - }, - ] - - if (gasPrices.slow) { - _items.push({ icon: IconName.ClockPlus, title: localize('general.slow'), - subtitle: formatGasFee(gasUnit, gasPrices.slow), + subtitle: formatGasFee(gasUnit, gasPriceSlow), selected: selectedGasSpeed === GasSpeed.Slow, onClick: () => onChooseGasPriceClick(GasSpeed.Slow), - }) - } + }, + ] if (gasPrices.average) { _items.push({