Skip to content

Commit

Permalink
Merge pull request #106 from shapeshift/fix-local-host
Browse files Browse the repository at this point in the history
  • Loading branch information
gomesalexandre authored Dec 5, 2024
2 parents 402e508 + eaa1d43 commit 11fd845
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/components/DeveloperModeModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -91,7 +92,7 @@ const ENVIRONMENTS: Environment[] = [
{
key: 'localhost',
title: 'localhost',
url: 'http://localhost:3000',
url: LOCAL_URI,
},
]

Expand Down
4 changes: 3 additions & 1 deletion src/lib/navigationFilter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -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
}
Expand Down
1 change: 1 addition & 0 deletions types/react-native-dotenv.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down

0 comments on commit 11fd845

Please sign in to comment.