Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
chore: Cleanup env vars (#1088)
Browse files Browse the repository at this point in the history
* chore: Cleanup env vars

* chore: Add comment
  • Loading branch information
garethfuller authored and agualis committed Sep 16, 2024
1 parent deede8c commit 4781abe
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
7 changes: 3 additions & 4 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@ NEXT_PUBLIC_BALANCER_API_URL=https://api-v3.balancer.fi/graphql
NEXT_PUBLIC_WALLET_CONNECT_ID=1b6b722470b504a53cf011e1e629a9eb

# For wallet checks (optional)
PRIVATE_HYPERNATIVE_EMAIL=xxx
PRIVATE_HYPERNATIVE_PASSWORD=xxx
PRIVATE_HYPERNATIVE_API_ID=xxx
PRIVATE_HYPERNATIVE_API_SECRET=xxx

# For fiat currency conversions (optional)
PRIVATE_CURRENCYAPI_KEY=xxx

# For integration tests and rpc proxy routes
NEXT_PRIVATE_INFURA_KEY=xxx
# For integration tests and rpc proxy routes (optional)
PRIVATE_ALCHEMY_KEY=xxx


2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
env:
NEXT_PUBLIC_BALANCER_API_URL: https://api-v3.balancer.fi/graphql
NEXT_PUBLIC_WALLET_CONNECT_ID: ${{ secrets.NEXT_PUBLIC_WALLET_CONNECT_ID }}
NEXT_PRIVATE_INFURA_KEY: ${{ secrets.NEXT_PRIVATE_INFURA_KEY }}
PRIVATE_ALCHEMY_KEY: ${{ secrets.PRIVATE_ALCHEMY_KEY }}

jobs:
Build:
Expand Down
12 changes: 7 additions & 5 deletions test/anvil/anvil-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,17 @@ export function getTestRpcSetup(networkName: NetworksWithFork) {
}

export function getForkUrl(network: NetworkSetup, verbose = false): string {
const privateInfuraKey = process.env['NEXT_PRIVATE_INFURA_KEY']
if (privateInfuraKey) {
const privateAlchemyKey = process.env['PRIVATE_ALCHEMY_KEY']
if (privateAlchemyKey) {
if (network.networkName === 'Ethereum') {
return `https://mainnet.infura.io/v3/${privateInfuraKey}`
return `https://eth-mainnet.g.alchemy.com/v2/${privateAlchemyKey}`
}
if (network.networkName === 'Polygon') {
return `https://polygon-mainnet.infura.io/v3/${privateInfuraKey}`
return `https://polygon-mainnet.g.alchemy.com/v2/${privateAlchemyKey}`
}
if (network.networkName === 'Sepolia') {
return `https://eth-sepolia.g.alchemy.com/v2/${privateAlchemyKey}`
}
if (network.networkName === 'Sepolia') return `https://sepolia.infura.io/v3/${privateInfuraKey}`
}

if (!network.fallBackRpc) {
Expand Down

0 comments on commit 4781abe

Please sign in to comment.