Skip to content

Commit

Permalink
Introduce new localnet envs
Browse files Browse the repository at this point in the history
  • Loading branch information
buberdds committed Nov 7, 2024
1 parent 97f621e commit bcb1251
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,8 @@ REACT_APP_SHOW_BUILD_BANNERS=true
# REACT_APP_FIXED_LAYER=sapphire
# REACT_APP_SKIP_GRAPH=true
REACT_APP_SHOW_FIAT_VALUES=true

# LOCALNET SETTINGS
REACT_APP_LOCALNET_CONSENSUS=false
REACT_APP_LOCALNET_SAPPHIRE=false
REACT_APP_LOCALNET_EMERALD=false
6 changes: 3 additions & 3 deletions src/app/utils/route-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@ export abstract class RouteUtils {
[Layer.consensus]: !isStableDeploy,
},
[Network.localnet]: {
[Layer.emerald]: false,
[Layer.sapphire]: true,
[Layer.emerald]: process.env.REACT_APP_LOCALNET_EMERALD === 'true',
[Layer.sapphire]: process.env.REACT_APP_LOCALNET_SAPPHIRE === 'true',
[Layer.cipher]: false,
[Layer.pontusxdev]: false,
[Layer.pontusxtest]: false,
[Layer.consensus]: true,
[Layer.consensus]: process.env.REACT_APP_LOCALNET_CONSENSUS === 'true',
},
} satisfies Record<Network, Record<Layer, boolean>>

Expand Down
3 changes: 3 additions & 0 deletions src/types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ declare global {
REACT_APP_FIXED_LAYER?: string
REACT_APP_SKIP_GRAPH?: string
REACT_APP_SHOW_FIAT_VALUES: 'true' | 'false'
REACT_APP_LOCALNET_CONSENSUS: 'true' | 'false'
REACT_APP_LOCALNET_SAPPHIRE: 'true' | 'false'
REACT_APP_LOCALNET_EMERALD: 'true' | 'false'
}
}

Expand Down

0 comments on commit bcb1251

Please sign in to comment.