Skip to content

Commit d957189

Browse files
committed
fix(mobile): use isProduction() instead of __DEV__ for dev console visibility
__DEV__ is false in EAS Update JS bundles. Use EXPO_PUBLIC_NODE_ENV check via isProduction() so dev console is available in non-production builds including CI.
1 parent dcda058 commit d957189

4 files changed

Lines changed: 10 additions & 8 deletions

File tree

apps/mobile/.env.example

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ EXPO_PUBLIC_LAUNCH_DARKLY=""
55
EXPO_PUBLIC_SENTRY_DSN=""
66
EXPO_PUBLIC_MIXPANEL_TOKEN=""
77

8-
EXPO_PUBLIC_ENABLE_DEV_CONSOLE=""
9-
108
EXPO_PUBLIC_ONRAMPER_API_KEY=onramperapikey
119
EXPO_PUBLIC_ONRAMPER_WIDGET_HOST=onramperwidgethost
1210
EXPO_PUBLIC_ONRAMPER_SIGNING_SECRET=onrampersigningkey

apps/mobile/src/components/home/home-without-account-screen.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { HeaderActions } from '@/components/screen/screen-header/components/head
33
import { useGlobalSheets } from '@/core/global-sheet-provider';
44
import { CreateWalletCard } from '@/features/account/components/create-wallet-card';
55
import { NetworkBadge } from '@/features/settings/network-badge';
6+
import { isProduction } from '@/shared/environment';
67
import { TestId } from '@/shared/test-id';
78
import { useRouter } from 'expo-router';
89

@@ -17,7 +18,7 @@ export function HomeScreenWithoutAccount() {
1718
<Screen.Header
1819
leftElement={
1920
<Box flexDirection="row" alignItems="center" p="2" gap="2">
20-
{__DEV__ || process.env.EXPO_PUBLIC_ENABLE_DEV_CONSOLE ? (
21+
{!isProduction() ? (
2122
<Pressable
2223
onPress={() => router.navigate('/developer-console')}
2324
testID={TestId.homeDeveloperToolsButton}

apps/mobile/src/components/screen/screen-header/components/header-actions.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { isProduction } from '@/shared/environment';
12
import { TestId } from '@/shared/test-id';
23
import { useSettings } from '@/store/settings/settings';
34
import { useWallets } from '@/store/wallets/wallets.read';
@@ -24,7 +25,7 @@ export function HeaderActions() {
2425

2526
return (
2627
<Box alignItems="center" flexDirection="row" justifyContent="center">
27-
{(__DEV__ || process.env.EXPO_PUBLIC_ENABLE_DEV_CONSOLE) && (
28+
{!isProduction() && (
2829
<IconButton
2930
label={t`Dev Console`}
3031
icon={<CodeIcon />}

apps/mobile/src/i18n/locales/en/messages.po

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ msgstr "Depositing"
713713
msgid "Description"
714714
msgstr "Description"
715715

716-
#: src/components/screen/screen-header/components/header-actions.tsx:29
716+
#: src/components/screen/screen-header/components/header-actions.tsx:30
717717
msgid "Dev Console"
718718
msgstr "Dev Console"
719719

@@ -1034,7 +1034,7 @@ msgstr "Hide account"
10341034
msgid "Hide advanced options"
10351035
msgstr "Hide advanced options"
10361036

1037-
#: src/components/screen/screen-header/components/header-actions.tsx:56
1037+
#: src/components/screen/screen-header/components/header-actions.tsx:57
10381038
msgid "Hide balances"
10391039
msgstr "Hide balances"
10401040

@@ -1721,7 +1721,9 @@ msgstr "Sending to your own address isn’t supported. Choose a different addres
17211721
msgid "Sent"
17221722
msgstr "Sent"
17231723

1724-
#: src/components/screen/screen-header/components/header-actions.tsx:45
1724+
#: src/app/settings/index.tsx:59
1725+
#: src/components/screen/screen-header/components/header-actions.tsx:46
1726+
#: src/features/qr-scanner/use-camera-permission.ts:38
17251727
msgid "Settings"
17261728
msgstr "Settings"
17271729

@@ -1738,7 +1740,7 @@ msgstr "Share anonymous usage details"
17381740
msgid "Show advanced options"
17391741
msgstr "Show advanced options"
17401742

1741-
#: src/components/screen/screen-header/components/header-actions.tsx:57
1743+
#: src/components/screen/screen-header/components/header-actions.tsx:58
17421744
msgid "Show balances"
17431745
msgstr "Show balances"
17441746

0 commit comments

Comments
 (0)