From 64d854687369a63a77f3b31793b87af570e2f3c5 Mon Sep 17 00:00:00 2001 From: Kevin Le Seigle Date: Wed, 2 Oct 2024 11:08:40 +0200 Subject: [PATCH] fix: fetch feature flags every 5 minutes --- .changeset/strange-news-compete.md | 6 ++++++ .../src/renderer/components/FirebaseRemoteConfig.tsx | 4 ++-- .../src/components/FirebaseRemoteConfig.tsx | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 .changeset/strange-news-compete.md diff --git a/.changeset/strange-news-compete.md b/.changeset/strange-news-compete.md new file mode 100644 index 000000000000..9f961eafd1c3 --- /dev/null +++ b/.changeset/strange-news-compete.md @@ -0,0 +1,6 @@ +--- +"ledger-live-desktop": minor +"live-mobile": minor +--- + +Fetch FF every 5 minutes for LLM & LLD diff --git a/apps/ledger-live-desktop/src/renderer/components/FirebaseRemoteConfig.tsx b/apps/ledger-live-desktop/src/renderer/components/FirebaseRemoteConfig.tsx index 49a7a162b94e..dda9d5a5abe3 100644 --- a/apps/ledger-live-desktop/src/renderer/components/FirebaseRemoteConfig.tsx +++ b/apps/ledger-live-desktop/src/renderer/components/FirebaseRemoteConfig.tsx @@ -134,8 +134,8 @@ export const FirebaseRemoteConfigProvider = ({ } }; fetchAndActivateConfig(); - // 1 hour fetch interval. TODO: make this configurable - const intervalId = window.setInterval(fetchAndActivateConfig, 1 * 60 * 60 * 1000); + // 5 minutes fetch interval. TODO: make this configurable + const intervalId = window.setInterval(fetchAndActivateConfig, 5 * 60 * 1000); return () => clearInterval(intervalId); }, [setConfig]); diff --git a/apps/ledger-live-mobile/src/components/FirebaseRemoteConfig.tsx b/apps/ledger-live-mobile/src/components/FirebaseRemoteConfig.tsx index b39a1927415f..6f597df22d0e 100644 --- a/apps/ledger-live-mobile/src/components/FirebaseRemoteConfig.tsx +++ b/apps/ledger-live-mobile/src/components/FirebaseRemoteConfig.tsx @@ -38,8 +38,8 @@ export const FirebaseRemoteConfigProvider = ({ } }; fetchConfig(); - // 1 hour fetch interval. TODO: make this configurable - const intervalId = setInterval(fetchConfig, 1 * 60 * 60 * 1000); + // 5 minutes fetch interval. TODO: make this configurable + const intervalId = setInterval(fetchConfig, 5 * 60 * 1000); return () => { clearInterval(intervalId); unmounted = true;