Skip to content

Commit

Permalink
ci: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
microHoffman committed Nov 30, 2024
1 parent 0f86c83 commit b3c8073
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ jobs:
with:
file: "env/${{ env.ENV_FILE }}"
replace-all: |
NEXT_PUBLIC_ETHEREUM_RPC_URL=${{ secrets.NEXT_PUBLIC_ETHEREUM_RPC_URL }}
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID=${{ secrets.NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID }}
NEXT_PUBLIC_ETHEREUM_RPC_URL=${{ secrets.NEXT_PUBLIC_ETHEREUM_RPC_URL }}
NEXT_PUBLIC_SEPOLIA_RPC_URL=${{ secrets.NEXT_PUBLIC_SEPOLIA_RPC_URL }}
NEXT_PUBLIC_WEB3_STORAGE_KEY=${{ secrets.NEXT_PUBLIC_WEB3_STORAGE_KEY }}
NEXT_PUBLIC_ETHERSCAN_API_KEY=${{ secrets.NEXT_PUBLIC_ETHERSCAN_API_KEY }}
Expand Down
19 changes: 8 additions & 11 deletions constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,14 @@ export const PUB_TOKEN_VOTING_PLUGIN_ADDRESS = {
[11155111]: "0xED79E70122E06bB036EB6668e772FaCE4566a4cC",
} as const satisfies ContractAddressRegistry;

const getEnabledChains = (): [AppKitNetwork, ...AppKitNetwork[]] => {
if (process.env.NEXT_PUBLIC_ENABLED_CHAIN_IDS?.includes(",")) {
// multiple chains enabled
return process.env.NEXT_PUBLIC_ENABLED_CHAIN_IDS.split(",").map((chainId) =>
getAppKitChain(Number(chainId) as ChainId)
) as [AppKitNetwork, ...AppKitNetwork[]];
} else {
return [getAppKitChain(Number(process.env.NEXT_PUBLIC_ENABLED_CHAIN_IDS) as ChainId)];
}
};
export const ENABLED_CHAINS = getEnabledChains();
const ENABLED_CHAIN_IDS = process.env.NEXT_PUBLIC_ENABLED_CHAIN_IDS!;

export const ENABLED_CHAINS = (
ENABLED_CHAIN_IDS.includes(",")
? ENABLED_CHAIN_IDS.split(",").map((chainId) => getAppKitChain(Number(chainId) as ChainId))
: [getAppKitChain(Number(process.env.NEXT_PUBLIC_ENABLED_CHAIN_IDS) as ChainId)]
) as [AppKitNetwork, ...AppKitNetwork[]];

export const PREFERRED_CHAIN = getAppKitChain(Number(process.env.NEXT_PUBLIC_PREFERRED_CHAIN_ID) as ChainId);

export const PUB_IPFS_ENDPOINTS = process.env.NEXT_PUBLIC_IPFS_ENDPOINTS as string;
Expand Down

0 comments on commit b3c8073

Please sign in to comment.