smartwallet-app
smartwallet-app copied to clipboard
Feature Flags
Scope of the feature
Add build-time configurability for some constants or feature flags. Example uses:
- configure registry's built in smart contract address and ipfs connector
- enable/disable identity creation (use dummy identity instead)
- enable/disable entropy collection
There are a few ways:
-
.env
file through, of course, react-native-dotenv- can store config values for dev and prod envs in separate files, so we see the values in each environment in one place
- inline babel transformation of
process.env['SOME_ENV_VAR']
via babel-plugin-transform-inline-env-variables- values are in process environment
- config can be manually loaded into process env anyway
- we'll probably depend on fewer vars, maybe just
NODE_ENV
, and making the config value decisions inline in code
- values are in process environment
- use pre-existing
src/config.ts
file?