From 0a3265e7b76d031cb548236419f8f3f562f76125 Mon Sep 17 00:00:00 2001 From: Ishpaul Singh <104348397+ishpaul777@users.noreply.github.com> Date: Thu, 13 Feb 2025 00:37:20 +0530 Subject: [PATCH] Revert "Remove hybrid app check from getEnvironment" --- src/libs/Environment/getEnvironment/index.native.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libs/Environment/getEnvironment/index.native.ts b/src/libs/Environment/getEnvironment/index.native.ts index 6d298c3fdae9..5dac0ad1d73e 100644 --- a/src/libs/Environment/getEnvironment/index.native.ts +++ b/src/libs/Environment/getEnvironment/index.native.ts @@ -1,3 +1,4 @@ +import {NativeModules} from 'react-native'; import Config from 'react-native-config'; import betaChecker from '@libs/Environment/betaChecker'; import CONST from '@src/CONST'; @@ -28,6 +29,12 @@ function getEnvironment(): Promise { return; } + // If we don't use Development, and we're in the HybridApp, we should use Production + if (NativeModules.HybridAppModule) { + environment = CONST.ENVIRONMENT.PRODUCTION; + return; + } + // If we haven't set the environment yet and we aren't on dev/adhoc, check to see if this is a beta build betaChecker.isBetaBuild().then((isBeta) => { environment = isBeta ? CONST.ENVIRONMENT.STAGING : CONST.ENVIRONMENT.PRODUCTION;