• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mozilla / fx-private-relay / d97e4774-93b5-457a-b576-c93ce9d260a7

15 Aug 2025 03:39PM UTC coverage: 86.28% (-0.01%) from 86.29%
d97e4774-93b5-457a-b576-c93ce9d260a7

Pull #5796

circleci

groovecoder
fix MPP-4327 - refactor(runtimeData): centralize fallback values and types

- Extracted `DEFAULT_RUNTIME_DATA` into a new `runtimeData-default.ts` module
  to prevent app crashes when the `/runtime_data` API fails.
- Ensured fallback matches production values, including full country list
  in `PERIODICAL_PREMIUM_PLANS`.
- Moved `RuntimeData` and related types to `types.ts` for reuse and clarity.
- Updated `useRuntimeData` to import default values and types cleanly.

This improves resilience of the app and ensures consistent runtime behavior
across environments without relying on external API availability.
Pull Request #5796: fix MPP-4327 - refactor(runtimeData): centralize fallback values and …

2739 of 3947 branches covered (69.39%)

Branch coverage included in aggregate %.

0 of 1 new or added line in 1 file covered. (0.0%)

38 existing lines in 2 files now uncovered.

17907 of 19982 relevant lines covered (89.62%)

9.95 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/frontend/src/hooks/api/runtimeData-default.ts
1
import { RuntimeData } from "./types";
2

NEW
3
export const DEFAULT_RUNTIME_DATA: RuntimeData = {
×
4
  FXA_ORIGIN: "https://accounts.firefox.com",
5
  GOOGLE_ANALYTICS_ID: "UA-77033033-33",
6
  GA4_MEASUREMENT_ID: "G-YXT33S87LT",
7
  PERIODICAL_PREMIUM_PRODUCT_ID: "prod_KGizMiBqUJdYoY",
8
  PHONE_PRODUCT_ID: "prod_KGizMiBqUJdYoY",
9
  BUNDLE_PRODUCT_ID: "prod_MIex7Q079igFZJ",
10
  MEGABUNDLE_PRODUCT_ID: "prod_SOYBYCOWallcgz",
11
  BASKET_ORIGIN: "https://basket.mozilla.org",
12
  MAX_MINUTES_TO_VERIFY_REAL_PHONE: 5,
13
  WAFFLE_FLAGS: [
14
    ["free_user_onboarding", true],
15
    ["holiday_promo_2023", false],
16
    ["tracker_removal", true],
17
    ["four_mask_limit_upsell", true],
18
    ["interview_recruitment", false],
19
    ["intro_pricing_countdown", true],
20
    ["custom_domain_management_redesign", true],
21
    ["phones", true],
22
    ["bundle", true],
23
    ["phone_launch_survey", true],
24
    ["multi_replies", true],
25
    ["mask_redesign", true],
26
    ["welcome_email", true],
27
    ["mailing_list_announcement", true],
28
    ["eu_country_expansion", true],
29
    ["resender_headers", true],
30
  ],
31
  WAFFLE_SWITCHES: [],
32
  WAFFLE_SAMPLES: [],
33
  PERIODICAL_PREMIUM_PLANS: {
34
    country_code: "US",
35
    countries: [
36
      "AT",
37
      "BE",
38
      "BG",
39
      "CA",
40
      "CH",
41
      "CY",
42
      "CZ",
43
      "DE",
44
      "DK",
45
      "EE",
46
      "ES",
47
      "FI",
48
      "FR",
49
      "GB",
50
      "GR",
51
      "HR",
52
      "HU",
53
      "IE",
54
      "IT",
55
      "LT",
56
      "LU",
57
      "LV",
58
      "MT",
59
      "MY",
60
      "NL",
61
      "NZ",
62
      "PL",
63
      "PR",
64
      "PT",
65
      "RO",
66
      "SE",
67
      "SG",
68
      "SI",
69
      "SK",
70
      "US",
71
    ],
72
    available_in_country: true,
73
    plan_country_lang_mapping: {
74
      US: {
75
        "*": {
76
          monthly: {
77
            price: 1.99,
78
            currency: "USD",
79
            url: "https://payments.firefox.com/relaypremium/monthly/landing",
80
          },
81
          yearly: {
82
            price: 0.99,
83
            currency: "USD",
84
            url: "https://payments.firefox.com/relaypremium/yearly/landing",
85
          },
86
        },
87
      },
88
      // Insert the full plan_country_lang_mapping for all countries here
89
    },
90
  },
91
  PHONE_PLANS: {
92
    country_code: "US",
93
    countries: ["CA", "PR", "US"],
94
    available_in_country: true,
95
    plan_country_lang_mapping: {
96
      US: {
97
        "*": {
98
          monthly: {
99
            price: 4.99,
100
            currency: "USD",
101
            url: "https://payments.firefox.com/relaypremiumphone/monthly/landing",
102
          },
103
          yearly: {
104
            price: 3.99,
105
            currency: "USD",
106
            url: "https://payments.firefox.com/relaypremiumphone/yearly/landing",
107
          },
108
        },
109
      },
110
    },
111
  },
112
  BUNDLE_PLANS: {
113
    country_code: "US",
114
    countries: ["CA", "PR", "US"],
115
    available_in_country: true,
116
    plan_country_lang_mapping: {
117
      US: {
118
        "*": {
119
          yearly: {
120
            price: 6.99,
121
            currency: "USD",
122
            url: "https://payments.firefox.com/vpn-relay-bundle/yearly/landing",
123
          },
124
        },
125
      },
126
    },
127
  },
128
  MEGABUNDLE_PLANS: {
129
    country_code: "US",
130
    countries: ["US"],
131
    available_in_country: true,
132
    plan_country_lang_mapping: {
133
      US: {
134
        "*": {
135
          yearly: {
136
            price: 8.25,
137
            currency: "USD",
138
            url: "https://payments.firefox.com/privacyprotectionplan/yearly/landing",
139
          },
140
        },
141
      },
142
    },
143
  },
144
};
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc