diff --git a/.env.template b/.env.template index e922141..e9c772e 100644 --- a/.env.template +++ b/.env.template @@ -13,6 +13,7 @@ GOME_URI=https://gome.shapeshift.com JUICE_URI=https://juice.shapeshift.com WOOD_URI=https://wood.shapeshift.com NEO_URI=https://neo.shapeshift.com +LOCAL_URI=http://localhost:3000 # used for support widget, a la intercom CHATWOOT_URI=https://app.chatwoot.com diff --git a/src/components/DeveloperModeModal.tsx b/src/components/DeveloperModeModal.tsx index ea0343c..d6faab5 100644 --- a/src/components/DeveloperModeModal.tsx +++ b/src/components/DeveloperModeModal.tsx @@ -12,6 +12,7 @@ import { SHAPESHIFT_URI, WOOD_URI, YEET_URI, + LOCAL_URI, } from 'react-native-dotenv' import { setItemAsync } from 'expo-secure-store' import { styles } from '../styles' @@ -91,7 +92,7 @@ const ENVIRONMENTS: Environment[] = [ { key: 'localhost', title: 'localhost', - url: 'http://localhost:3000', + url: LOCAL_URI, }, ] diff --git a/src/lib/navigationFilter.ts b/src/lib/navigationFilter.ts index 80e4492..503f4cb 100644 --- a/src/lib/navigationFilter.ts +++ b/src/lib/navigationFilter.ts @@ -15,6 +15,7 @@ import { NEO_URI, WALLETCONNECT_VERIFY_SERVER, WALLETCONNECT_VERIFY_FALLBACK_SERVER, + LOCAL_URI, } from 'react-native-dotenv' const openBrowser = async (url: string) => { @@ -40,7 +41,8 @@ export const shouldLoadFilter = (request: ShouldStartLoadRequest) => { request.url.startsWith(NEO_URI) || request.url.startsWith(CHATWOOT_URI) || request.url.startsWith(WALLETCONNECT_VERIFY_SERVER) || - request.url.startsWith(WALLETCONNECT_VERIFY_FALLBACK_SERVER) + request.url.startsWith(WALLETCONNECT_VERIFY_FALLBACK_SERVER) || + request.url.startsWith(LOCAL_URI) ) { return true } diff --git a/types/react-native-dotenv.d.ts b/types/react-native-dotenv.d.ts index 446ed9e..e51c594 100644 --- a/types/react-native-dotenv.d.ts +++ b/types/react-native-dotenv.d.ts @@ -19,6 +19,7 @@ declare module 'react-native-dotenv' { export const JUICE_URI: string export const WOOD_URI: string export const NEO_URI: string + export const LOCAL_URI: string /** * chatwoot support widget */