Files
anonklub/ui/src/lib/config.ts
sripwoud 94eac87e5c chore: replace prettier and eslint by biome (#422)
* chore: replace `prettier` and `eslint` by `biome` (#421)

* chore: replace `prettier` and `eslint` by `biome`

* chore: lint

* changeset
2024-03-30 22:15:54 +00:00

41 lines
1.1 KiB
TypeScript

import type { Chain } from 'wagmi'
import { sepolia } from 'wagmi/chains'
interface Config {
appTitle: string
chains: Chain[]
message: string
typebot: string
urls: {
queryApi: string
}
walletConnectProjectId: string
}
// need to use full reference to process.env, can't destructure or do process.env[name]
// https://nextjs.org/docs/pages/building-your-application/configuring/environment-variables#loading-environment-variables
const walletConnectProjectId =
process.env.NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID ?? ''
if (walletConnectProjectId === '') {
// this means next build will fail
if (process.env.NEXT_PHASE === 'phase-production-build')
throw new Error(
'Missing environment variable NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID',
)
console.warn(
'Missing environment variable NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID',
)
}
export const config: Config = {
appTitle: 'Anonklub',
chains: [sepolia],
message:
'I am generating an anonymous proof of Ethereum address ownership with AnonKlub.',
typebot: 'anonklub-feedback',
urls: {
queryApi: 'https://query.anonklub.xyz',
},
walletConnectProjectId,
}