Skip to content

Commit

Permalink
chore: add ethStakingModalWithFiltersEnabled analytics ab tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
beths-ledger committed Oct 30, 2024
1 parent 18973b7 commit 4c06bed
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changeset/proud-insects-worry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"ledger-live-desktop": patch
"live-mobile": patch
---

Add ethStakingModalWithFilters segment analytics trait for ab tests
4 changes: 4 additions & 0 deletions apps/ledger-live-desktop/src/renderer/analytics/segment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ const getPtxAttributes = () => {
if (!analyticsFeatureFlagMethod) return {};
const fetchAdditionalCoins = analyticsFeatureFlagMethod("fetchAdditionalCoins");
const stakingProviders = analyticsFeatureFlagMethod("ethStakingProviders");
const ethStakingModalWithFiltersEnabled = analyticsFeatureFlagMethod(
"ethStakingModalWithFilters",
)?.enabled;
const ptxCard = analyticsFeatureFlagMethod("ptxCard");
const ptxSwapMoonpayProviderFlag = analyticsFeatureFlagMethod("ptxSwapMoonpayProvider");

Expand Down Expand Up @@ -117,6 +120,7 @@ const getPtxAttributes = () => {
ptxSwapLiveAppDemoThree,
ptxSwapCoreExperiment,
ptxSwapExodusProvider,
ethStakingModalWithFiltersEnabled,
};
};

Expand Down
4 changes: 4 additions & 0 deletions apps/ledger-live-mobile/src/analytics/segment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ const getFeatureFlagProperties = () => {
(async () => {
const fetchAdditionalCoins = analyticsFeatureFlagMethod("fetchAdditionalCoins");
const stakingProviders = analyticsFeatureFlagMethod("ethStakingProviders");
const ethStakingModalWithFiltersEnabled = analyticsFeatureFlagMethod(
"ethStakingModalWithFilters",
)?.enabled;

const isBatch1Enabled =
!!fetchAdditionalCoins?.enabled && fetchAdditionalCoins?.params?.batch === 1;
Expand All @@ -89,6 +92,7 @@ const getFeatureFlagProperties = () => {
isBatch2Enabled,
isBatch3Enabled,
stakingProvidersEnabled,
ethStakingModalWithFiltersEnabled,
});
})();
};
Expand Down

0 comments on commit 4c06bed

Please sign in to comment.