Skip to content

Commit

Permalink
Merge pull request #56744 from Expensify/revert-56401-jnowakow/remove…
Browse files Browse the repository at this point in the history
…-hybrid-app-check-for-enviroment

Revert "Remove hybrid app check from getEnvironment"

(cherry picked from commit 86f94ba)

(CP triggered by Julesssss)
  • Loading branch information
Julesssss authored and OSBotify committed Feb 12, 2025
1 parent 83eda83 commit 7fc4962
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/libs/Environment/getEnvironment/index.native.ts
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -28,6 +29,12 @@ function getEnvironment(): Promise<Environment> {
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;
Expand Down

0 comments on commit 7fc4962

Please sign in to comment.