File tree Expand file tree Collapse file tree 6 files changed +9
-6
lines changed
Expand file tree Collapse file tree 6 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 1+ Refactor REACT_APP_SKIP_GRAPH to match other env booleans
Original file line number Diff line number Diff line change @@ -29,6 +29,7 @@ REACT_APP_SHOW_BUILD_BANNERS=true
2929# REACT_APP_FIXED_NETWORK=testnet
3030# REACT_APP_FIXED_LAYER=sapphire
3131# REACT_APP_SKIP_GRAPH=true
32+ REACT_APP_SKIP_GRAPH = false
3233REACT_APP_SHOW_FIAT_VALUES = true
3334
3435# LOCALNET SETTINGS
Original file line number Diff line number Diff line change @@ -23,4 +23,5 @@ REACT_APP_SHOW_BUILD_BANNERS=true
2323# REACT_APP_FIXED_NETWORK=testnet
2424# REACT_APP_FIXED_LAYER=sapphire
2525# REACT_APP_SKIP_GRAPH=true
26+ REACT_APP_SKIP_GRAPH = false
2627REACT_APP_SHOW_FIAT_VALUES = true
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import { orderByLayer } from '../../types/layers'
1212
1313export const fixedNetwork = import . meta. env . REACT_APP_FIXED_NETWORK as Network | undefined
1414export const fixedLayer = import . meta. env . REACT_APP_FIXED_LAYER as Layer | undefined
15- export const skipGraph = ! ! fixedLayer || ! ! ( import . meta. env . REACT_APP_SKIP_GRAPH as boolean | undefined )
15+ export const skipGraph = ! ! fixedLayer || import . meta. env . REACT_APP_SKIP_GRAPH === 'true'
1616
1717export type ScopeFreedom =
1818 | 'network' // We can select only the network
Original file line number Diff line number Diff line change @@ -5,11 +5,11 @@ export const replaceNetworkWithBaseURL = <T>(
55 requestOverrides ?: AxiosRequestConfig ,
66) : Promise < AxiosResponse < T > > => {
77 if ( config . url ?. startsWith ( '/mainnet/' ) ) {
8- config . url = config . url . replace ( '/mainnet/' , import . meta. env . REACT_APP_API ! )
8+ config . url = config . url . replace ( '/mainnet/' , import . meta. env . REACT_APP_API )
99 } else if ( config . url ?. startsWith ( '/testnet/' ) ) {
10- config . url = config . url . replace ( '/testnet/' , import . meta. env . REACT_APP_TESTNET_API ! )
10+ config . url = config . url . replace ( '/testnet/' , import . meta. env . REACT_APP_TESTNET_API )
1111 } else if ( config . url ?. startsWith ( '/localnet/' ) ) {
12- config . url = config . url . replace ( '/localnet/' , import . meta. env . REACT_APP_LOCALNET_API ! )
12+ config . url = config . url . replace ( '/localnet/' , import . meta. env . REACT_APP_LOCALNET_API )
1313 } else {
1414 throw new Error ( `Expected URL to be prefixed with network: ${ config . url } ` )
1515 }
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ declare global {
99 REACT_APP_ENABLE_OASIS_MATOMO_ANALYTICS : string
1010 REACT_APP_API : string
1111 REACT_APP_TESTNET_API : string
12- REACT_APP_LOCALNET_API ? : string
12+ REACT_APP_LOCALNET_API : string
1313 REACT_APP_SHOW_BUILD_BANNERS : 'true' | 'false'
1414 REACT_APP_META_TITLE : string
1515 REACT_APP_META_IMAGE : string
@@ -28,7 +28,7 @@ declare global {
2828 REACT_APP_STAGING_URLS ?: string
2929 REACT_APP_FIXED_NETWORK ?: string
3030 REACT_APP_FIXED_LAYER ?: string
31- REACT_APP_SKIP_GRAPH ?: string
31+ REACT_APP_SKIP_GRAPH : 'true' | 'false'
3232 REACT_APP_SHOW_FIAT_VALUES : 'true' | 'false'
3333 REACT_APP_LOCALNET_CONSENSUS : 'true' | 'false'
3434 REACT_APP_LOCALNET_SAPPHIRE : 'true' | 'false'
You can’t perform that action at this time.
0 commit comments