Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused env configs #6254

Merged
merged 12 commits into from
Nov 4, 2024
30 changes: 0 additions & 30 deletions bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,20 +203,8 @@ workflows:
set -x
# write your script here
touch .env
echo "DATA_ORIGIN=$DATA_ORIGIN" >> .env
echo "INFURA_PROJECT_ID=$INFURA_PROJECT_ID" >> .env
echo "INFURA_PROJECT_ID_DEV=$INFURA_PROJECT_ID_DEV" >> .env
echo "REACT_APP_SEGMENT_API_WRITE_KEY=$REACT_APP_SEGMENT_API_WRITE_KEY" >> .env
echo "DATA_API_KEY=$DATA_API_KEY" >> .env
echo "DATA_ENDPOINT=$DATA_ENDPOINT" >> .env
echo "SENTRY_ENDPOINT=$SENTRY_ENDPOINT" >> .env
echo "SENTRY_ENVIRONMENT=$SENTRY_ENVIRONMENT" >> .env
echo "WYRE_ENDPOINT=$WYRE_ENDPOINT" >> .env
echo "WYRE_ACCOUNT_ID=$WYRE_ACCOUNT_ID" >> .env
echo "RAINBOW_WYRE_MERCHANT_ID=$RAINBOW_WYRE_MERCHANT_ID" >> .env
echo "WYRE_ENDPOINT_TEST=$WYRE_ENDPOINT_TEST" >> .env
echo "WYRE_ACCOUNT_ID_TEST=$WYRE_ACCOUNT_ID_TEST" >> .env
echo "RAINBOW_WYRE_MERCHANT_ID_TEST=$RAINBOW_WYRE_MERCHANT_ID_TEST" >> .env
echo "ETHERSCAN_API_KEY=$ETHERSCAN_API_KEY" >> .env
echo "BRANCH_APP_DOMAIN=$BRANCH_APP_DOMAIN" >> .env
echo "BRANCH_KEY=$BRANCH_KEY" >> .env
Expand All @@ -225,11 +213,8 @@ workflows:
echo "DEV_PKEY=\$DEV_PKEY" >> .env
echo "TEST_SEEDS=\"$TEST_SEEDS\"" >> .env
echo "IS_TESTING=$IS_TESTING" >> .env
echo "WYRE_TOKEN=$WYRE_TOKEN" >> .env
echo "WYRE_TOKEN_TEST=$WYRE_TOKEN_TEST" >> .env
echo "ENABLE_DEV_MODE=$ENABLE_DEV_MODE" >> .env
echo "GANACHE_URL=$GANACHE_URL" >> .env
echo "ETH_GAS_STATION_API_KEY=$ETH_GAS_STATION_API_KEY" >> .env



Expand Down Expand Up @@ -260,32 +245,17 @@ workflows:

# write your script here
touch .env
echo "DATA_ORIGIN=$DATA_ORIGIN" >> .env
echo "INFURA_PROJECT_ID=$INFURA_PROJECT_ID" >> .env
echo "INFURA_PROJECT_ID_DEV=$INFURA_PROJECT_ID_DEV" >> .env
echo "REACT_APP_SEGMENT_API_WRITE_KEY=$REACT_APP_SEGMENT_API_WRITE_KEY" >> .env
echo "DATA_API_KEY=$DATA_API_KEY" >> .env
echo "DATA_ENDPOINT=$DATA_ENDPOINT" >> .env
echo "SENTRY_ENDPOINT=$SENTRY_ENDPOINT" >> .env
echo "SENTRY_ENVIRONMENT=$SENTRY_ENVIRONMENT" >> .env
echo "WYRE_ENDPOINT=$WYRE_ENDPOINT" >> .env
echo "WYRE_ACCOUNT_ID=$WYRE_ACCOUNT_ID" >> .env
echo "RAINBOW_WYRE_MERCHANT_ID=$RAINBOW_WYRE_MERCHANT_ID" >> .env
echo "WYRE_ENDPOINT_TEST=$WYRE_ENDPOINT_TEST" >> .env
echo "WYRE_ACCOUNT_ID_TEST=$WYRE_ACCOUNT_ID_TEST" >> .env
echo "RAINBOW_WYRE_MERCHANT_ID_TEST=$RAINBOW_WYRE_MERCHANT_ID_TEST" >> .env
echo "ETHERSCAN_API_KEY=$ETHERSCAN_API_KEY" >> .env
echo "BRANCH_APP_DOMAIN=$BRANCH_APP_DOMAIN" >> .env
echo "BRANCH_KEY=$BRANCH_KEY" >> .env
echo "RAINBOW_MASTER_KEY=$RAINBOW_MASTER_KEY" >> .env
echo "DEV_SEEDS=\"$DEV_SEEDS_PROD\"" >> .env
echo "DEV_PKEY=$DEV_PKEY_PROD" >> .env
echo "IS_TESTING=$IS_TESTING" >> .env
echo "WYRE_TOKEN=$WYRE_TOKEN" >> .env
echo "WYRE_TOKEN_TEST=$WYRE_TOKEN_TEST" >> .env
echo "ENABLE_DEV_MODE=$ENABLE_DEV_MODE" >> .env
echo "GANACHE_URL=$GANACHE_URL" >> .env
echo "ETH_GAS_STATION_API_KEY=$ETH_GAS_STATION_API_KEY" >> .env

title: Generate .env file for testflight
app:
Expand Down
38 changes: 0 additions & 38 deletions globals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,40 +30,8 @@ declare module 'react-native-dotenv' {
export const ENABLE_DEV_MODE: '0' | '1';
export const SENTRY_ENDPOINT: string;
export const SENTRY_ENVIRONMENT: string;
export const DATA_API_KEY: string;
export const DATA_ENDPOINT: string;
export const DATA_ORIGIN: string;
export const ADDYS_API_KEY: string;
export const ETHEREUM_GOERLI_RPC: string;
export const ETHEREUM_GOERLI_RPC_DEV: string;
export const ETHEREUM_KOVAN_RPC: string;
export const ETHEREUM_KOVAN_RPC_DEV: string;
export const ETHEREUM_MAINNET_RPC: string;
export const ETHEREUM_MAINNET_RPC_DEV: string;
export const ETHEREUM_RINKEBY_RPC: string;
export const ETHEREUM_RINKEBY_RPC_DEV: string;
export const ETHEREUM_ROPSTEN_RPC: string;
export const ETHEREUM_ROPSTEN_RPC_DEV: string;
export const OPTIMISM_MAINNET_RPC: string;
export const BASE_MAINNET_RPC: string;
export const BASE_MAINNET_RPC_DEV: string;
export const AVALANCHE_MAINNET_RPC: string;
export const AVALANCHE_MAINNET_RPC_DEV: string;
export const AVALANCHE_FUJI_RPC: string;
export const BLAST_MAINNET_RPC: string;
export const DEGEN_MAINNET_RPC: string;
export const POLYGON_MAINNET_RPC: string;
export const ARBITRUM_MAINNET_RPC: string;
export const BSC_MAINNET_RPC: string;
export const ZORA_MAINNET_RPC: string;
export const RAINBOW_WYRE_MERCHANT_ID: string;
export const RAINBOW_WYRE_MERCHANT_ID_TEST: string;
export const WYRE_ACCOUNT_ID: string;
export const WYRE_ACCOUNT_ID_TEST: string;
export const WYRE_ENDPOINT: string;
export const WYRE_ENDPOINT_TEST: string;
export const WYRE_TOKEN: string;
export const WYRE_TOKEN_TEST: string;
export const IMGIX_DOMAIN: string;
export const IMGIX_TOKEN: string;
export const CLOUDINARY_API_KEY: string;
Expand All @@ -78,23 +46,17 @@ declare module 'react-native-dotenv' {
export const APP_CENTER_READ_ONLY_TOKEN_IOS: string;
export const CODE_PUSH_DEPLOYMENT_KEY_ANDROID: string;
export const CODE_PUSH_DEPLOYMENT_KEY_IOS: string;
export const COVALENT_ANDROID_API_KEY: string;
export const COVALENT_IOS_API_KEY: string;
export const NFT_API_KEY: string;
export const NFT_API_URL: string;
export const ETHERSCAN_API_KEY: string;
export const POAP_API_KEY: string;
export const HARDHAT_URL_ANDROID: string;
export const HARDHAT_URL_IOS: string;
export const SIMPLEHASH_API_KEY: string;
export const RAINBOW_MASTER_KEY: string;
export const REACT_APP_SEGMENT_API_WRITE_KEY: string;
export const SECURE_WALLET_HASH_KEY: string;
export const TEST_SEEDS: string;
export const DEV_PKEY: string;
export const RAINBOW_TOKEN_LIST_URL: string;
export const WC_PROJECT_ID: string;
export const RAMP_HOST_API_KEY: string;
export const LOG_LEVEL: 'debug' | 'info' | 'warn' | 'error';
export const LOG_DEBUG: string;
export const QUIET_OLD_LOGGER: string;
Expand Down
48 changes: 0 additions & 48 deletions src/model/remoteConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,13 @@ import { createQueryKey, queryClient } from '@/react-query';
import { delay } from '@/utils/delay';
import remoteConfig from '@react-native-firebase/remote-config';
import { useQuery } from '@tanstack/react-query';
import {
ARBITRUM_MAINNET_RPC,
AVALANCHE_MAINNET_RPC,
AVALANCHE_MAINNET_RPC_DEV,
BASE_MAINNET_RPC,
BASE_MAINNET_RPC_DEV,
BLAST_MAINNET_RPC,
BSC_MAINNET_RPC,
DATA_API_KEY,
DATA_ENDPOINT,
DATA_ORIGIN,
DEGEN_MAINNET_RPC,
ETHEREUM_GOERLI_RPC,
ETHEREUM_GOERLI_RPC_DEV,
ETHEREUM_MAINNET_RPC,
ETHEREUM_MAINNET_RPC_DEV,
OPTIMISM_MAINNET_RPC,
POLYGON_MAINNET_RPC,
ZORA_MAINNET_RPC,
} from 'react-native-dotenv';

export interface RainbowConfig extends Record<string, string | boolean | number> {
arbitrum_mainnet_rpc: string;
bsc_mainnet_rpc: string;
data_api_key: string;
data_endpoint: string;
data_origin: string;
default_slippage_bips: string;
ethereum_goerli_rpc: string;
ethereum_mainnet_rpc: string;
f2c_enabled: boolean;
flashbots_enabled: boolean;
op_nft_network: string;
op_rewards_enabled: boolean;
optimism_mainnet_rpc: string;
polygon_mainnet_rpc: string;
zora_mainnet_rpc: string;
base_mainnet_rpc: string;
avalanche_mainnet_rpc: string;
degen_mainnet_rpc: string;
blast_mainnet_rpc: string;
swagg_enabled: boolean;
trace_call_block_number_offset: number;
profiles_enabled: boolean;
Expand Down Expand Up @@ -94,10 +60,6 @@ export interface RainbowConfig extends Record<string, string | boolean | number>
}

export const DEFAULT_CONFIG: RainbowConfig = {
arbitrum_mainnet_rpc: ARBITRUM_MAINNET_RPC,
data_api_key: DATA_API_KEY,
data_endpoint: DATA_ENDPOINT || 'wss://api-v4.zerion.io',
data_origin: DATA_ORIGIN,
default_slippage_bips: JSON.stringify({
apechain: 200,
arbitrum: 200,
Expand All @@ -111,20 +73,10 @@ export const DEFAULT_CONFIG: RainbowConfig = {
polygon: 200,
zora: 200,
}),
ethereum_goerli_rpc: __DEV__ ? ETHEREUM_GOERLI_RPC_DEV : ETHEREUM_GOERLI_RPC,
ethereum_mainnet_rpc: __DEV__ ? ETHEREUM_MAINNET_RPC_DEV : ETHEREUM_MAINNET_RPC,
f2c_enabled: true,
flashbots_enabled: true,
op_nft_network: 'op-mainnet',
op_rewards_enabled: false,
optimism_mainnet_rpc: OPTIMISM_MAINNET_RPC,
polygon_mainnet_rpc: POLYGON_MAINNET_RPC,
bsc_mainnet_rpc: BSC_MAINNET_RPC,
zora_mainnet_rpc: ZORA_MAINNET_RPC,
base_mainnet_rpc: __DEV__ ? BASE_MAINNET_RPC_DEV : BASE_MAINNET_RPC,
avalanche_mainnet_rpc: __DEV__ ? AVALANCHE_MAINNET_RPC_DEV : AVALANCHE_MAINNET_RPC,
degen_mainnet_rpc: DEGEN_MAINNET_RPC,
blast_mainnet_rpc: BLAST_MAINNET_RPC,
swagg_enabled: true,
trace_call_block_number_offset: 20,
profiles_enabled: true,
Expand Down
Loading