Skip to content

Commit

Permalink
switching from network-specific Alchemy keys 🛰️
Browse files Browse the repository at this point in the history
  • Loading branch information
dysbulic committed Jun 11, 2024
1 parent 79a09a6 commit a5a7c4e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gcp-deploy-frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:

steps:
- name: Cancel Existing Runs
uses: styfle/cancel-workflow-action@0.10.0
uses: styfle/cancel-workflow-action@0.12.0
with:
access_token: ${{github.token}}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gcp-deploy-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:

steps:
- name: Cancel Existing Runs
uses: styfle/cancel-workflow-action@0.10.0
uses: styfle/cancel-workflow-action@0.12.0
with:
access_token: ${{github.token}}

Expand Down
2 changes: 2 additions & 0 deletions docker/frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ ARG GCAL_CALENDAR_ID
ARG GCAL_PRIVATE_KEY
ARG GCAL_CLIENT_EMAIL
ARG GCAL_PROJECT_NUMBER
ARG ALCHEMY_API_KEY
ARG WEB3_STORAGE_DID
ARG WEB3_STORAGE_KEY
ARG WEB3_STORAGE_PROOF
Expand All @@ -72,6 +73,7 @@ ENV NEXT_PUBLIC_GOOGLE_ANALYTICS_ID $GOOGLE_ANALYTICS_ID
ENV NEXT_PUBLIC_USERBACK_TOKEN $USERBACK_TOKEN
ENV NEXT_PUBLIC_CERAMIC_URL $CERAMIC_URL
ENV NEXT_PUBLIC_GCAL_CALENDAR_ID $GCAL_CALENDAR_ID
ENV NEXT_PUBLIC_ALCHEMY_API_KEY $ALCHEMY_API_KEY
ENV NEXT_PUBLIC_WEB3_STORAGE_DID $WEB3_STORAGE_DID
ENV NEXT_PUBLIC_WEB3_STORAGE_KEY $WEB3_STORAGE_KEY
ENV NEXT_PUBLIC_WEB3_STORAGE_PROOF $WEB3_STORAGE_PROOF
Expand Down
6 changes: 3 additions & 3 deletions packages/web/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ const config = createConfig(
chains: [optimism, polygon, mainnet],
transports: {
[optimism.id]: http(
`https://opt-mainnet.g.alchemy.com/v2/${process.env.NEXT_PUBLIC_ALCHEMY_API_KEY}`,
`https://opt-mainnet.g.alchemy.com/v2/${CONFIG.alchemyAPIKey}`,
),
[mainnet.id]: http(
`https://eth-mainnet.g.alchemy.com/v2/${process.env.NEXT_PUBLIC_ALCHEMY_API_KEY}`,
`https://eth-mainnet.g.alchemy.com/v2/${CONFIG.alchemyAPIKey}`,
),
[polygon.id]: http(
`https://polygon-mainnet.g.alchemy.com/v2/${process.env.NEXT_PUBLIC_ALCHEMY_API_KEY}`,
`https://polygon-mainnet.g.alchemy.com/v2/${CONFIG.alchemyAPIKey}`,
),
},

Expand Down
6 changes: 3 additions & 3 deletions packages/web/utils/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const NETWORK_INFO: NetworkInfo = {
label: 'Ethereum',
symbol: 'ETH',
explorer: 'https://etherscan.io',
rpc: `https://eth-mainnet.g.alchemy.com/v2/${process.env.NEXT_PUBLIC_ALCHEMY_MAINNET}`,
rpc: `https://eth-mainnet.g.alchemy.com/v2/${CONFIG.alchemyAPIKey}`,
},
[GOERLI]: {
chainId: GOERLI,
Expand All @@ -49,7 +49,7 @@ export const NETWORK_INFO: NetworkInfo = {
label: 'Polygon',
symbol: 'MATIC',
explorer: 'https://polygonscan.com',
rpc: `https://eth-mainnet.g.alchemy.com/v2/${process.env.NEXT_PUBLIC_ALCHEMY_MATIC}`,
rpc: `https://polygon-mainnet.g.alchemy.com/v2/${CONFIG.alchemyAPIKey}`,
},
[MUMBAI]: {
chainId: MUMBAI,
Expand Down Expand Up @@ -84,4 +84,4 @@ export function getHexChainId(chain?: string): string {
}
}

export const getNumberId = (chainId: string): number => parseInt(chainId, 16)
export const getNumberId = (chainId: string): number => Number(chainId);

0 comments on commit a5a7c4e

Please sign in to comment.