Skip to content

Commit

Permalink
Update commerce api key to be private
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcramer committed Dec 10, 2024
1 parent b6273b0 commit a1e3129
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 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_ONCHAINKIT_API_KEY="CDP_API_KEY_1234567890"
NEXT_PRIVATE_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_ONCHAINKIT_API_KEY="GET_FROM_COINBASE_DEVELOPER_PLATFORM"
NEXT_PRIVATE_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_ONCHAINKIT_API_KEY="CDP_API_KEY_1234567890"
NEXT_PRIVATE_ONCHAINKIT_API_KEY="CDP_API_KEY_1234567890"

NEXT_PUBLIC_ENVIRONMENT=localhost
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ You can find your Coinbase Commerce API key on [Coinbase Commerce](https://beta.

```sh
# See https://portal.cdp.coinbase.com/products/onchainkit
NEXT_PUBLIC_ONCHAINKIT_API_KEY="GET_FROM_COINBASE_DEVELOPER_PLATFORM"
NEXT_PRIVATE_ONCHAINKIT_API_KEYY="GET_FROM_COINBASE_DEVELOPER_PLATFORM"

# See https://beta.commerce.coinbase.com/
NEXT_PUBLIC_COINBASE_COMMERCE_API_KEY="GET_FROM_COINBASE_COMMERCE"
Expand Down
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_ONCHAINKIT_API_KEY } from '../config';
import { NEXT_PRIVATE_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_ONCHAINKIT_API_KEY}
apiKey={NEXT_PRIVATE_ONCHAINKIT_API_KEY}
chain={base}
config={{ appearance: { theme: 'base' } }}
>
Expand Down
4 changes: 2 additions & 2 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +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_ONCHAINKIT_API_KEY =
process.env.NEXT_PUBLIC_ONCHAINKIT_API_KEY;
export const NEXT_PRIVATE_ONCHAINKIT_API_KEY =
process.env.NEXT_PRIVATE_ONCHAINKIT_API_KEY;

0 comments on commit a1e3129

Please sign in to comment.