From 1f7435a0d38fa5793511ac9dd6a427d04e02fce8 Mon Sep 17 00:00:00 2001 From: ameerul-deriv Date: Mon, 19 Aug 2024 10:47:24 +0800 Subject: [PATCH 1/2] fix: localCurrencies set to undefined after sell order or leaving tab --- src/hooks/api/settings/p2p-settings/useSettings.ts | 1 - src/routes/AppContent/index.tsx | 10 +--------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/hooks/api/settings/p2p-settings/useSettings.ts b/src/hooks/api/settings/p2p-settings/useSettings.ts index 616c1463..84b51976 100644 --- a/src/hooks/api/settings/p2p-settings/useSettings.ts +++ b/src/hooks/api/settings/p2p-settings/useSettings.ts @@ -99,7 +99,6 @@ const useSettings = () => { return { ...rest, data: p2pSettings, - setP2PSettings, }; }; diff --git a/src/routes/AppContent/index.tsx b/src/routes/AppContent/index.tsx index 11cc4f6c..098b73e2 100644 --- a/src/routes/AppContent/index.tsx +++ b/src/routes/AppContent/index.tsx @@ -38,12 +38,7 @@ const AppContent = () => { const [activeTab, setActiveTab] = useState(() => getActiveTab(location.pathname)); const [hasCreatedAdvertiser, setHasCreatedAdvertiser] = useState(false); - const { - isActive, - isLoading: isP2PSettingsLoading, - setP2PSettings, - subscribe: subscribeP2PSettings, - } = api.settings.useSettings(); + const { isActive, isLoading: isP2PSettingsLoading, subscribe: subscribeP2PSettings } = api.settings.useSettings(); const { error, isActive: isSubscribed, @@ -62,9 +57,6 @@ const AppContent = () => { if (activeAccountData) { subscribeP2PSettings({}); } - return () => { - setP2PSettings({}); - }; // eslint-disable-next-line react-hooks/exhaustive-deps }, [activeAccountData]); From 6f59ca04f9919d26396345ded1020e35549b5bb8 Mon Sep 17 00:00:00 2001 From: ameerul-deriv Date: Mon, 19 Aug 2024 11:21:21 +0800 Subject: [PATCH 2/2] chore: empty commit