Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32555908
D5382.1767209765.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D5382.1767209765.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
Wed, Dec 31, 7:36 PM (2 m, 45 s ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5871032
Default Alt Text
D5382.1767209765.diff (2 KB)
Attached To
Mode
D5382: [native] derive SIWE url instead of hardcoding it
Attached
Detach File
Event Timeline
Log In to Comment