diff --git a/apps/ledger-live-mobile/src/analytics/segment.ts b/apps/ledger-live-mobile/src/analytics/segment.ts index a745b6acc57c..3c898e19e2ef 100644 --- a/apps/ledger-live-mobile/src/analytics/segment.ts +++ b/apps/ledger-live-mobile/src/analytics/segment.ts @@ -76,6 +76,7 @@ const getFeatureFlagProperties = () => { (async () => { const fetchAdditionalCoins = analyticsFeatureFlagMethod("fetchAdditionalCoins"); const stakingProviders = analyticsFeatureFlagMethod("ethStakingProviders"); + const stakePrograms = analyticsFeatureFlagMethod("stakePrograms"); const isBatch1Enabled = !!fetchAdditionalCoins?.enabled && fetchAdditionalCoins?.params?.batch === 1; @@ -85,12 +86,22 @@ const getFeatureFlagProperties = () => { !!fetchAdditionalCoins?.enabled && fetchAdditionalCoins?.params?.batch === 3; const stakingProvidersEnabled = stakingProviders?.enabled && stakingProviders?.params?.listProvider.length; + const stakingCurrenciesEnabled = + !stakePrograms?.params?.list?.length || !stakePrograms?.enabled + ? {} + : Object.fromEntries( + stakePrograms?.params?.list?.map((currencyId: string) => [ + `feature_earn_${currencyId}_enabled`, + true, + ]), + ); updateIdentify({ isBatch1Enabled, isBatch2Enabled, isBatch3Enabled, stakingProvidersEnabled, + ...stakingCurrenciesEnabled, }); })(); };