Skip to content

Commit

Permalink
Merge pull request #19 from coinbase/alissa.crane/env
Browse files Browse the repository at this point in the history
chore: update env variable name
  • Loading branch information
fakepixels authored Dec 4, 2024
2 parents c773df1 + 41b6a73 commit b6273b0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .env.local.default
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ NEXT_PUBLIC_COINBASE_COMMERCE_API_KEY="COMMERCE_API_KEY_1234567890"
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID=GA_TEST_1234567890

# See https://www.coinbase.com/developer-platform/products/base-node
NEXT_PUBLIC_CDP_API_KEY="CDP_API_KEY_1234567890"
NEXT_PUBLIC_ONCHAINKIT_API_KEY="CDP_API_KEY_1234567890"

NEXT_PUBLIC_ENVIRONMENT=localhost
2 changes: 1 addition & 1 deletion .env.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ NEXT_PUBLIC_COINBASE_COMMERCE_API_KEY="GET_FROM_COINBASE_COMMERCE_PLATFORM"
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID=

# See https://www.coinbase.com/developer-platform/products/base-node
NEXT_PUBLIC_CDP_API_KEY="GET_FROM_COINBASE_DEVELOPER_PLATFORM"
NEXT_PUBLIC_ONCHAINKIT_API_KEY="GET_FROM_COINBASE_DEVELOPER_PLATFORM"

# ~~~
NEXT_PUBLIC_ENVIRONMENT=localhost
Expand Down
2 changes: 1 addition & 1 deletion .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ NEXT_PUBLIC_COINBASE_COMMERCE_API_KEY="COMMERCE_API_KEY_1234567890"
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID=GA_TEST_1234567890

# See https://www.coinbase.com/developer-platform/products/base-node
NEXT_PUBLIC_CDP_API_KEY="CDP_API_KEY_1234567890"
NEXT_PUBLIC_ONCHAINKIT_API_KEY="CDP_API_KEY_1234567890"

NEXT_PUBLIC_ENVIRONMENT=localhost
4 changes: 2 additions & 2 deletions src/components/OnchainProviders.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import type { ReactNode } from 'react';
import { base } from 'viem/chains';
import { WagmiProvider } from 'wagmi';
import { NEXT_PUBLIC_CDP_API_KEY } from '../config';
import { NEXT_PUBLIC_ONCHAINKIT_API_KEY } from '../config';
import { wagmiConfig } from '../wagmi';

type Props = { children: ReactNode };
Expand All @@ -16,7 +16,7 @@ function OnchainProviders({ children }: Props) {
<WagmiProvider config={wagmiConfig}>
<QueryClientProvider client={queryClient}>
<OnchainKitProvider
apiKey={NEXT_PUBLIC_CDP_API_KEY}
apiKey={NEXT_PUBLIC_ONCHAINKIT_API_KEY}
chain={base}
config={{ appearance: { theme: 'base' } }}
>
Expand Down
3 changes: 2 additions & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ export const NEXT_PUBLIC_URL =
? 'http://localhost:3000'
: 'https://onchain-commerce-template.vercel.app';
// Add your API KEY from the Coinbase Developer Portal
export const NEXT_PUBLIC_CDP_API_KEY = process.env.NEXT_PUBLIC_CDP_API_KEY;
export const NEXT_PUBLIC_ONCHAINKIT_API_KEY =
process.env.NEXT_PUBLIC_ONCHAINKIT_API_KEY;

0 comments on commit b6273b0

Please sign in to comment.