diff --git a/src/featureFlags/defaultFeatures.ts b/src/featureFlags/defaultFeatures.ts index 0c98ed133e..89241ffe63 100644 --- a/src/featureFlags/defaultFeatures.ts +++ b/src/featureFlags/defaultFeatures.ts @@ -7,4 +7,49 @@ export const defaultFeatures: DefaultFeatures = { pushNotifications: { enabled: false, }, + ratings: { + enabled: false, + params: { + happy_moments: [ + { + route_name: "ReceiveConfirmation", + timer: 2000, + type: "on_enter", + }, + { + route_name: "ClaimRewardsValidationSuccess", + timer: 2000, + type: "on_enter", + }, + { + route_name: "SendValidationSuccess", + timer: 2000, + type: "on_enter", + }, + { + route_name: "MarketDetail", + timer: 3000, + type: "on_enter", + }, + ], + conditions: { + not_now_delay: { + days: 15, + }, + disappointed_delay: { + days: 90, + }, + satisfied_then_not_now_delay: { + days: 3, + }, + minimum_accounts_number: 3, + minimum_app_starts_number: 3, + minimum_duration_since_app_first_start: { + days: 3, + }, + minimum_number_of_app_starts_since_last_crash: 2, + }, + support_email: "support@ledger.com", + }, + }, }; diff --git a/src/featureFlags/types.ts b/src/featureFlags/types.ts index c7f0f88cae..d596ca7353 100644 --- a/src/featureFlags/types.ts +++ b/src/featureFlags/types.ts @@ -1,10 +1,11 @@ // Add others with union (e.g. "learn" | "market" | "foo") -export type FeatureId = "learn" | "pushNotifications"; +export type FeatureId = "learn" | "pushNotifications" | "ratings"; // We use objects instead of direct booleans for potential future improvements // like feature versioning etc export type Feature = { enabled: boolean; + params?: any; }; export type DefaultFeatures = { [key in FeatureId]: Feature };