From ca652cdc8155b280c49e84161b52ef5a9ccf08e6 Mon Sep 17 00:00:00 2001 From: evavirseda Date: Thu, 25 Jan 2024 17:50:39 +0100 Subject: [PATCH] feat: Improve `ExpirationTimePicker` component (#7782) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * refactor: improve expirationTimePicker componente * fix:revert changes to expiration time picker * fix: persist expiration time picker value when toggling gift storage deposit --------- Co-authored-by: Branko Bosnic Co-authored-by: Begoña Álvarez de la Cruz --- .../components/popups/send/SendConfirmationPopup.svelte | 1 - packages/shared/components/ExpirationTimePicker.svelte | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/desktop/components/popups/send/SendConfirmationPopup.svelte b/packages/desktop/components/popups/send/SendConfirmationPopup.svelte index 8b6a5f39382..61e82b69ea2 100644 --- a/packages/desktop/components/popups/send/SendConfirmationPopup.svelte +++ b/packages/desktop/components/popups/send/SendConfirmationPopup.svelte @@ -60,7 +60,6 @@ let visibleSurplus: number | undefined = undefined let isPreparingOutput = false - $: expirationTimePicker?.setNull(giftStorageDeposit) $: isBaseTokenTransfer = diff --git a/packages/shared/components/ExpirationTimePicker.svelte b/packages/shared/components/ExpirationTimePicker.svelte index 7a5edd47f66..a86e0f5be2a 100644 --- a/packages/shared/components/ExpirationTimePicker.svelte +++ b/packages/shared/components/ExpirationTimePicker.svelte @@ -14,8 +14,11 @@ if (bool && value) { storedValue = value value = null + previouslySelectedPeriod = selectedTimePeriod + selectedTimePeriod = TimePeriod.None } else { value = storedValue ?? value + selectedTimePeriod = previouslySelectedPeriod } }