Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3509581
D5382.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D5382.diff
View Options
diff --git a/native/account/siwe-panel.react.js b/native/account/siwe-panel.react.js
--- a/native/account/siwe-panel.react.js
+++ b/native/account/siwe-panel.react.js
@@ -19,10 +19,10 @@
import { NavContext } from '../navigation/navigation-context';
import { useSelector } from '../redux/redux-utils';
import { nativeLogInExtraInfoSelector } from '../selectors/account-selectors';
+import { defaultLandingURLPrefix } from '../utils/url-utils';
import { setNativeCredentials } from './native-credentials';
-const commSIWE = __DEV__
- ? 'http://localhost/commlanding/siwe'
- : 'https://comm.app/siwe';
+
+const commSIWE = `${defaultLandingURLPrefix}/siwe`;
type BaseProps = {
+setActiveAlert: (activeAlert: boolean) => void,
diff --git a/native/utils/url-utils.js b/native/utils/url-utils.js
--- a/native/utils/url-utils.js
+++ b/native/utils/url-utils.js
@@ -10,6 +10,7 @@
const localhostHostnameFromAndroidEmulator = '10.0.2.2';
const productionNodeServerURL = 'https://squadcal.org';
+const productionLandingURL = 'https://comm.app';
const devIsEmulator: boolean = __DEV__ && DeviceInfo.isEmulatorSync();
function getDevServerHostname(): string {
@@ -29,12 +30,22 @@
return `http://${hostname}/comm`;
}
+function getDevLandingURLFromHostname(hostname: string): string {
+ return `http://${hostname}/commlanding`;
+}
+
function getDevNodeServerURL(): string {
invariant(__DEV__, 'getDevNodeServerURL called from production');
const hostname = getDevServerHostname();
return getDevNodeServerURLFromHostname(hostname);
}
+function getDevLandingURL(): string {
+ invariant(__DEV__, 'getDevLandingURL called from production');
+ const hostname = getDevServerHostname();
+ return getDevLandingURLFromHostname(hostname);
+}
+
const nodeServerOptions = [productionNodeServerURL];
if (Platform.OS === 'android') {
nodeServerOptions.push(
@@ -48,12 +59,17 @@
? getDevNodeServerURL()
: productionNodeServerURL;
+const defaultLandingURLPrefix: string = __DEV__
+ ? getDevLandingURL()
+ : productionLandingURL;
+
const natNodeServer: string = getDevNodeServerURLFromHostname(natDevHostname);
const setCustomServer = 'SET_CUSTOM_SERVER';
export {
defaultURLPrefix,
+ defaultLandingURLPrefix,
getDevServerHostname,
nodeServerOptions,
natNodeServer,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 22, 6:24 AM (19 m, 54 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2690475
Default Alt Text
D5382.diff (2 KB)
Attached To
Mode
D5382: [native] derive SIWE url instead of hardcoding it
Attached
Detach File
Event Timeline
Log In to Comment