FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
uniswap_interface_sc/apps/web/src/utils/env.ts at main · stringcode86/uniswap_interface_sc · GitHub
stringcode86
uniswap_interface_sc
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
uniswap_interface_sc
/
apps
/
web
/
src
/
utils
/
env.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
38 lines (33 loc) · 1.1 KB
Breadcrumbs
uniswap_interface_sc
/
apps
/
web
/
src
/
utils
/
env.ts
Copy path
File metadata and controls
38 lines (33 loc) · 1.1 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import
{
isBetaEnv
,
isProdEnv
}
from
'utilities/src/environment/env'
function
isAppUniswapOrg
(
{
hostname
}
:
{
hostname
:
string
}
)
:
boolean
{
return
hostname
===
'app.uniswap.org'
}
function
isAppUniswapStagingOrg
(
{
hostname
}
:
{
hostname
:
string
}
)
:
boolean
{
return
hostname
===
'app.corn-staging.com'
}
export
function
isBrowserRouterEnabled
(
)
:
boolean
{
if
(
isProdEnv
(
)
)
{
if
(
isAppUniswapOrg
(
window
.
location
)
||
isAppUniswapStagingOrg
(
window
.
location
)
||
isLocalhost
(
window
.
location
)
// cypress tests
)
{
return
true
}
return
false
// production builds *not* served through our domains or localhost, eg IPFS
}
return
true
// local dev builds
}
function
isLocalhost
(
{
hostname
}
:
{
hostname
:
string
}
)
:
boolean
{
return
hostname
===
'localhost'
}
export
function
isRemoteReportingEnabled
(
)
:
boolean
{
// Disable in e2e test environments
if
(
isBetaEnv
(
)
&&
!
isAppUniswapStagingOrg
(
window
.
location
)
)
{
return
false
}
if
(
isProdEnv
(
)
&&
!
isAppUniswapOrg
(
window
.
location
)
)
{
return
false
}
return
process
.
env
.
REACT_APP_SENTRY_ENABLED
===
'true'
}
Back
|
FazBrowse Home
|
New Git URL