Skip to content

Commit

Permalink
Chore: use separate Infura tokens for dev
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed May 30, 2024
1 parent 3da9a4e commit 4d7b295
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ Here's the list of all the environment variables:

| Env variable | Description
| ------------------------------------------------------ | -----------
| `NEXT_PUBLIC_INFURA_TOKEN` | [Infura](https://docs.infura.io/infura/networks/ethereum/how-to/secure-a-project/project-id) RPC API token
| `NEXT_PUBLIC_INFURA_TOKEN` | [Infura](https://docs.infura.io/infura/networks/ethereum/how-to/secure-a-project/project-id) RPC API token (**required**)
| `NEXT_PUBLIC_INFURA_TOKEN_DEVSTAGING` | Infura token for dev/staging (**required**)
| `NEXT_PUBLIC_SAFE_APPS_INFURA_TOKEN` | Infura token for Safe Apps, falls back to `NEXT_PUBLIC_INFURA_TOKEN`
| `NEXT_PUBLIC_SAFE_APPS_INFURA_TOKEN_DEVSTAGING` | Infura token for Safe Apps in dev/staging
| `NEXT_PUBLIC_IS_PRODUCTION` | Set to `true` to build a minified production app
| `NEXT_PUBLIC_GATEWAY_URL_PRODUCTION` | The base URL for the [Safe Client Gateway](https://github.com/safe-global/safe-client-gateway)
| `NEXT_PUBLIC_GATEWAY_URL_STAGING` | The base CGW URL on staging
Expand Down
8 changes: 6 additions & 2 deletions src/config/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export const LS_NAMESPACE = 'SAFE_v2__'
export const LATEST_SAFE_VERSION = process.env.NEXT_PUBLIC_SAFE_VERSION || '1.3.0'

// Access keys
export const INFURA_TOKEN = process.env.NEXT_PUBLIC_INFURA_TOKEN || ''
export const INFURA_TOKEN =
(IS_PRODUCTION ? process.env.NEXT_PUBLIC_INFURA_TOKEN : process.env.NEXT_PUBLIC_INFURA_TOKEN_DEVSTAGING) || ''
export const SENTRY_DSN = process.env.NEXT_PUBLIC_SENTRY_DSN || ''
export const BEAMER_ID = process.env.NEXT_PUBLIC_BEAMER_ID || ''

Expand All @@ -38,7 +39,10 @@ export const SAFE_LOCKING_ADDRESS: { [chainId: string]: string } = {
}

// Safe Apps
export const SAFE_APPS_INFURA_TOKEN = process.env.NEXT_PUBLIC_SAFE_APPS_INFURA_TOKEN || INFURA_TOKEN
export const SAFE_APPS_INFURA_TOKEN =
(IS_PRODUCTION
? process.env.NEXT_PUBLIC_SAFE_APPS_INFURA_TOKEN
: process.env.NEXT_PUBLIC_SAFE_APPS_INFURA_TOKEN_DEVSTAGING) || INFURA_TOKEN
export const SAFE_APPS_THIRD_PARTY_COOKIES_CHECK_URL = 'https://third-party-cookies-check.gnosis-safe.com'
export const SAFE_APPS_DEMO_SAFE_MAINNET = 'eth:0xfF501B324DC6d78dC9F983f140B9211c3EdB4dc7'
export const SAFE_APPS_SDK_DOCS_URL =
Expand Down

0 comments on commit 4d7b295

Please sign in to comment.