Skip to content

Commit

Permalink
chore: Cleanup env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
garethfuller committed Sep 16, 2024
1 parent 46df735 commit ba4b58e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
5 changes: 2 additions & 3 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
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 ba4b58e

Please sign in to comment.