Skip to content

Commit

Permalink
chore: remove unused config (#5844)
Browse files Browse the repository at this point in the history
### Description

#5841 is failing because of of
these unused exported configs (which somehow are now detected under a
new category there).

### Test plan

- Tests pass

### Related issues

- N/A

### Backwards compatibility

Yes

### Network scalability

If a new NetworkId and/or Network are added in the future, the changes
in this PR will:

- [x] Continue to work without code changes, OR trigger a compilation
error (guaranteeing we find it when a new network is added)
  • Loading branch information
jeanregisser authored Aug 28, 2024
1 parent f144a19 commit a89fed1
Show file tree
Hide file tree
Showing 11 changed files with 0 additions and 40 deletions.
2 changes: 0 additions & 2 deletions .env.alfajores
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ SMS_RETRIEVER_APP_SIGNATURE=GH+4Okn6nOW
DEV_SETTINGS_ACTIVE_INITIALLY=false
FIREBASE_ENABLED=true
SHOW_TESTNET_BANNER=true
SHOW_GET_INVITE_LINK=true
APP_BUNDLE_ID=org.celo.mobile.alfajores
APP_STORE_ID=1482389446
APP_DISPLAY_NAME=Alfajores
IOS_GOOGLE_SERVICE_PLIST=GoogleService-Info.alfajores.plist
DYNAMIC_DOWNLOAD_LINK=https://vlra.app/invite
SENTRY_ENABLED=true
AUTH0_DOMAIN=auth.alfajores.valora.xyz
2 changes: 0 additions & 2 deletions .env.alfajoresdev
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ DEFAULT_TESTNET=alfajores
SMS_RETRIEVER_APP_SIGNATURE=5yaJvJcZt2P
FIREBASE_ENABLED=true
SHOW_TESTNET_BANNER=true
SHOW_GET_INVITE_LINK=false
DEV_SETTINGS_ACTIVE_INITIALLY=true
# Enable for true hot reloading while dev-ing UI
DEV_RESTORE_NAV_STATE_ON_RELOAD=false
APP_BUNDLE_ID=org.celo.mobile.alfajores.dev
APP_STORE_ID=1482389446
APP_DISPLAY_NAME=Alfajores (dev)
IOS_GOOGLE_SERVICE_PLIST=GoogleService-Info.alfajoresdev.plist
DYNAMIC_DOWNLOAD_LINK=https://vlra.app/invite
SENTRY_ENABLED=false
AUTH0_DOMAIN=auth.alfajores.valora.xyz
2 changes: 0 additions & 2 deletions .env.alfajoresnightly
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ SMS_RETRIEVER_APP_SIGNATURE=js9M+WdHuWn
DEV_SETTINGS_ACTIVE_INITIALLY=false
FIREBASE_ENABLED=true
SHOW_TESTNET_BANNER=true
SHOW_GET_INVITE_LINK=true
APP_BUNDLE_ID=org.celo.mobile.alfajores.nightly
APP_STORE_ID=1482389446
APP_DISPLAY_NAME=Alfajores (nightly)
IOS_GOOGLE_SERVICE_PLIST=GoogleService-Info.alfajoresnightly.plist
DYNAMIC_DOWNLOAD_LINK=https://vlra.app/invite
SENTRY_ENABLED=true
AUTH0_DOMAIN=auth.alfajores.valora.xyz
2 changes: 0 additions & 2 deletions .env.mainnet
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ SMS_RETRIEVER_APP_SIGNATURE=bU9E4ctGtIW
DEV_SETTINGS_ACTIVE_INITIALLY=false
FIREBASE_ENABLED=true
SHOW_TESTNET_BANNER=false
SHOW_GET_INVITE_LINK=false
APP_BUNDLE_ID=co.clabs.valora
APP_STORE_ID=1520414263
APP_DISPLAY_NAME=Valora
IOS_GOOGLE_SERVICE_PLIST=GoogleService-Info.mainnet.plist
DYNAMIC_DOWNLOAD_LINK=https://vlra.app/invite
SENTRY_ENABLED=true
AUTH0_DOMAIN=auth.valora.xyz
2 changes: 0 additions & 2 deletions .env.mainnetdev
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ DEV_SETTINGS_ACTIVE_INITIALLY=true
DEV_RESTORE_NAV_STATE_ON_RELOAD=false
FIREBASE_ENABLED=true
SHOW_TESTNET_BANNER=false
SHOW_GET_INVITE_LINK=false
APP_BUNDLE_ID=co.clabs.valora.dev
APP_STORE_ID=1520414263
APP_DISPLAY_NAME=Valora (dev)
IOS_GOOGLE_SERVICE_PLIST=GoogleService-Info.mainnetdev.plist
DYNAMIC_DOWNLOAD_LINK=https://vlra.app/invite
SENTRY_ENABLED=false
AUTH0_DOMAIN=auth.valora.xyz
2 changes: 0 additions & 2 deletions .env.mainnetnightly
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@ SMS_RETRIEVER_APP_SIGNATURE=Bwb8drwC9Wl
DEV_SETTINGS_ACTIVE_INITIALLY=false
FIREBASE_ENABLED=true
SHOW_TESTNET_BANNER=false
SHOW_GET_INVITE_LINK=false
APP_BUNDLE_ID=co.clabs.valora.nightly
APP_STORE_ID=1520414263
APP_DISPLAY_NAME=Valora (nightly)
IOS_GOOGLE_SERVICE_PLIST=GoogleService-Info.mainnetnightly.plist
DYNAMIC_DOWNLOAD_LINK=https://vlra.app/invite
SENTRY_ENABLED=true
AUTH0_DOMAIN=auth.valora.xyz
1 change: 0 additions & 1 deletion .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ DEV_SETTINGS_ACTIVE_INITIALLY=true
# Disable firebase b.c. google-services.json files are missing in CI
FIREBASE_ENABLED=false
SHOW_TESTNET_BANNER=false
SHOW_GET_INVITE_LINK=true
APP_BUNDLE_ID=org.celo.mobile.test
APP_DISPLAY_NAME=Celo (test)
IOS_GOOGLE_SERVICE_PLIST=GoogleService-Info.alfajores.plist
Expand Down
1 change: 0 additions & 1 deletion __mocks__/react-native-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ export default {
DEV_SETTINGS_ACTIVE_INITIALLY: 'false',
SHOW_TESTNET_BANNER: 'true',
DEFAULT_TESTNET: 'alfajores',
DYNAMIC_DOWNLOAD_LINK: 'https://vlra.app/invite',
AUTH0_DOMAIN: 'auth0.com',
}
2 changes: 0 additions & 2 deletions __mocks__/secrets.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
"SEGMENT_API_KEY": "SEGMENT_API_KEY",
"SENTRY_CLIENT_URL": "SENTRY_CLIENT_URL",
"RECAPTCHA_SITE_KEY": "RECAPTCHA_SITE_KEY",
"SAFETYNET_KEY": "SAFETYNET_KEY",
"BIDALI_URL": "BIDALI_URL"
},
"mainnet": {
"SEGMENT_API_KEY": "SEGMENT_API_KEY",
"SENTRY_CLIENT_URL": "SENTRY_CLIENT_URL",
"RECAPTCHA_SITE_KEY": "RECAPTCHA_SITE_KEY",
"SAFETYNET_KEY": "SAFETYNET_KEY",
"BIDALI_URL": "BIDALI_URL"
}
}
Binary file modified secrets.json.enc
Binary file not shown.
24 changes: 0 additions & 24 deletions src/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { stringToBoolean } from '@celo/utils/lib/parsing'
import { Network } from '@fiatconnect/fiatconnect-types'
import BigNumber from 'bignumber.js'
import Config from 'react-native-config'
import { CachesDirectoryPath } from 'react-native-fs'
import { SpendMerchant } from 'src/fiatExchanges/Spend'
Expand Down Expand Up @@ -41,17 +40,11 @@ export const DEV_SETTINGS_ACTIVE_INITIALLY = stringToBoolean(
// VALUES
export const GAS_INFLATION_FACTOR = 1.5 // Used when estimating gas for txs
export const GAS_PRICE_INFLATION_FACTOR = 5 // Used when getting gas price, must match what Geth does
export const BALANCE_OUT_OF_SYNC_THRESHOLD = 1 * 60 // 1 minute
export const ALERT_BANNER_DURATION = 5000
export const MAX_COMMENT_LENGTH = 70
export const MAX_ENCRYPTED_COMMENT_LENGTH_APPROX = 640 // used to estimate fees. should be updated if MAX_COMMENT_LENGTH is changed. chosen empirically by encrypting a comment of max length
export const INPUT_DEBOUNCE_TIME = 1000 // milliseconds
// The minimum allowed value to add funds
export const DOLLAR_ADD_FUNDS_MIN_AMOUNT = 20
// The maximum allowed value to add funds
export const DOLLAR_ADD_FUNDS_MAX_AMOUNT = 5000
// The minimum allowed value to cash out
export const DOLLAR_CASH_OUT_MIN_AMOUNT = 0.01
// The minimum allowed value for a transaction such as a transfer
export const STABLE_TRANSACTION_MIN_AMOUNT = 0.01
export const CELO_TRANSACTION_MIN_AMOUNT = 0.001
Expand All @@ -60,25 +53,16 @@ export const TOKEN_MIN_AMOUNT = 0.00000001
export const DOLLAR_MIN_AMOUNT_ACCOUNT_FUNDED = 0.01
// The number of seconds before the sender can reclaim the payment.
export const DEFAULT_TESTNET = configOrThrow('DEFAULT_TESTNET')
export const SMS_RETRIEVER_APP_SIGNATURE = Config.SMS_RETRIEVER_APP_SIGNATURE
// ODIS minimum dollar balance for pepper quota retrieval
// TODO change this to new ODIS minimum dollar balance once deployed
export const ODIS_MINIMUM_DOLLAR_BALANCE = 0.1
// Additional gas added when setting the fee currency
// See details where used.
export const STATIC_GAS_PADDING = 50_000

// We can safely assume that any balance query returning a number
// higher than this is incorrect (currently set to 10M)
export const WALLET_BALANCE_UPPER_BOUND = new BigNumber('1e10')

export const TIME_UNTIL_TOKEN_INFO_BECOMES_STALE = 12 * ONE_HOUR_IN_MILLIS

export const DEFAULT_FORNO_URL =
DEFAULT_TESTNET === 'mainnet'
? 'https://forno.celo.org/'
: 'https://alfajores-forno.celo-testnet.org/'
export const BLOCKSCOUT_BASE_URL = Config.BLOCKSCOUT_BASE_URL

export const APP_BUNDLE_ID = configOrThrow('APP_BUNDLE_ID')

Expand All @@ -100,7 +84,6 @@ export const TORUS_NETWORK =
// FEATURE FLAGS
export const FIREBASE_ENABLED = stringToBoolean(Config.FIREBASE_ENABLED || 'true')
export const SHOW_TESTNET_BANNER = stringToBoolean(Config.SHOW_TESTNET_BANNER || 'false')
export const SHOW_GET_INVITE_LINK = stringToBoolean(Config.SHOW_GET_INVITE_LINK || 'false')
export const SENTRY_ENABLED = stringToBoolean(Config.SENTRY_ENABLED || 'false')

// SECRETS
Expand Down Expand Up @@ -140,7 +123,6 @@ export const STATSIG_API_KEY =
export const SEGMENT_API_KEY = keyOrUndefined(secretsFile, DEFAULT_TESTNET, 'SEGMENT_API_KEY')
export const SENTRY_CLIENT_URL = keyOrUndefined(secretsFile, DEFAULT_TESTNET, 'SENTRY_CLIENT_URL')
export const RECAPTCHA_SITE_KEY = keyOrUndefined(secretsFile, DEFAULT_TESTNET, 'RECAPTCHA_SITE_KEY')
export const SAFETYNET_KEY = keyOrUndefined(secretsFile, DEFAULT_TESTNET, 'SAFETYNET_KEY')
export const BIDALI_URL = keyOrUndefined(secretsFile, DEFAULT_TESTNET, 'BIDALI_URL')
export const WALLET_CONNECT_PROJECT_ID =
keyOrUndefined(secretsFile, DEFAULT_TESTNET, 'WALLET_CONNECT_PROJECT_ID') ??
Expand All @@ -167,14 +149,11 @@ export const SPEND_MERCHANT_LINKS: SpendMerchant[] = [

export const DEFAULT_PERSONA_TEMPLATE_ID = 'itmpl_5FYHGGFhdAYvfd7FvSpNADcC'

export const VALORA_LOGO_URL =
'https://storage.googleapis.com/celo-mobile-mainnet.appspot.com/images/valora-icon.png'
export const CELO_LOGO_URL =
'https://firebasestorage.googleapis.com/v0/b/celo-mobile-mainnet.appspot.com/o/images%2Fcelo.jpeg?alt=media'
export const SUPERCHARGE_LOGO_URL =
'https://firebasestorage.googleapis.com/v0/b/celo-mobile-mainnet.appspot.com/o/images%2Fsupercharge_logo.png?alt=media'

export const SIMPLEX_URI = 'https://valoraapp.com/simplex'
export const SIMPLEX_FEES_URL =
'https://support.simplex.com/hc/en-gb/articles/360014078420-What-fees-am-I-paying-'

Expand All @@ -183,11 +162,8 @@ export const SIMPLEX_FEES_URL =
// * android/**/AndroidManifest.xml
// * ios/**/AppDelegate.mm
export const DEEPLINK_PREFIX = 'celo'
export const CASH_IN_SUCCESS_DEEPLINK = `${DEEPLINK_PREFIX}://wallet/cash-in-success`
export const CASH_IN_FAILURE_DEEPLINK = `${DEEPLINK_PREFIX}://wallet/cash-in-failure`

export const APP_STORE_ID = Config.APP_STORE_ID
export const DYNAMIC_DOWNLOAD_LINK = Config.DYNAMIC_DOWNLOAD_LINK
export const DYNAMIC_LINK_DOMAIN_URI_PREFIX = 'https://vlra.app'
export const CROWDIN_DISTRIBUTION_HASH = 'e-f9f6869461793b9d1a353b2v7c'
export const OTA_TRANSLATIONS_FILEPATH = `file://${CachesDirectoryPath}/translations`
Expand Down

0 comments on commit a89fed1

Please sign in to comment.