From 8dd6453eeaf630a3e9140cbe91cfb0206a3c2361 Mon Sep 17 00:00:00 2001 From: Jean Ribeiro Date: Tue, 12 Mar 2024 13:02:42 -0300 Subject: [PATCH] fix: hide Transak window when drawer is open (#2118) Co-authored-by: Nicole O'Brien --- .../dashboard/buy-sell/views/BuySellMainView.svelte | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/desktop/views/dashboard/buy-sell/views/BuySellMainView.svelte b/packages/desktop/views/dashboard/buy-sell/views/BuySellMainView.svelte index b1330a1a89..1ae9b58eda 100644 --- a/packages/desktop/views/dashboard/buy-sell/views/BuySellMainView.svelte +++ b/packages/desktop/views/dashboard/buy-sell/views/BuySellMainView.svelte @@ -12,6 +12,8 @@ TransakWindowPlaceholder, } from '../components' import { isDashboardSideBarExpanded } from '@core/ui' + import { DrawerState } from '@desktop/auxiliary/drawer/types' + import { drawerState } from '@desktop/auxiliary/drawer/stores' $: $isDashboardSideBarExpanded, void updateTransakBounds() @@ -19,14 +21,15 @@ void resetTransak() } - $: void handlePopupState($popupState, $profileAuthPopup, $settingsState) + $: void handleOverlayChanges($popupState, $profileAuthPopup, $settingsState, $drawerState) - async function handlePopupState( + async function handleOverlayChanges( state: IPopupState, profilePopupState: IProfileAuthPopupState, - settingsState: ISettingsState + settingsState: ISettingsState, + drawerState: DrawerState ): Promise { - if (state.active || profilePopupState.active || settingsState.open) { + if (state.active || profilePopupState.active || settingsState.open || drawerState?.id) { await Platform.hideTransak() } else { await tick()