Skip to content

Commit 164f0a0

Browse files
authored
Merge pull request #13013 from Expensify/revert-12880-vit-experiementWithStagingNative
[No QA] Revert "Look at the platform to decide how to choose API"
2 parents e33f247 + 01deb2d commit 164f0a0

3 files changed

Lines changed: 3 additions & 24 deletions

File tree

src/libs/HttpUtils.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ import CONFIG from '../CONFIG';
55
import CONST from '../CONST';
66
import ONYXKEYS from '../ONYXKEYS';
77
import HttpsError from './Errors/HttpsError';
8-
import shouldUseStagingServer from './shouldUseStagingServer';
98

10-
let stagingServerToggleState = false;
9+
let shouldUseStagingServer = false;
1110
Onyx.connect({
1211
key: ONYXKEYS.USER,
13-
callback: val => stagingServerToggleState = lodashGet(val, 'shouldUseStagingServer', true),
12+
callback: val => shouldUseStagingServer = lodashGet(val, 'shouldUseStagingServer', true),
1413
});
1514

1615
let shouldFailAllRequests = false;
@@ -99,7 +98,7 @@ function xhr(command, data, type = CONST.NETWORK.METHOD.POST, shouldUseSecure =
9998

10099
let apiRoot = shouldUseSecure ? CONFIG.EXPENSIFY.SECURE_EXPENSIFY_URL : CONFIG.EXPENSIFY.URL_API_ROOT;
101100

102-
if (shouldUseStagingServer(stagingServerToggleState)) {
101+
if (CONFIG.IS_IN_STAGING && shouldUseStagingServer) {
103102
apiRoot = shouldUseSecure ? CONFIG.EXPENSIFY.STAGING_SECURE_EXPENSIFY_URL : CONFIG.EXPENSIFY.STAGING_EXPENSIFY_URL;
104103
}
105104

src/libs/shouldUseStagingServer/index.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

src/libs/shouldUseStagingServer/index.native.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)