Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcramer committed Dec 10, 2024
1 parent d3d1f9f commit ebde620
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ You can find your Coinbase Commerce API key on [Coinbase Commerce](https://beta.
NEXT_PUBLIC_ONCHAINKIT_API_KEY="GET_FROM_COINBASE_DEVELOPER_PLATFORM"

# See https://beta.commerce.coinbase.com/
NEXT_PRIVATE_COINBASE_COMMERCE_API_KEY="GET_FROM_COINBASE_COMMERCE"
COINBASE_COMMERCE_API_KEY="GET_FROM_COINBASE_COMMERCE"
```
<br />

Expand Down
6 changes: 3 additions & 3 deletions src/config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// Add this debugging at the top of the file
console.log('=== Environment Variables Debug ===');
console.log({
commerceKey: process.env.NEXT_PRIVATE_COINBASE_COMMERCE_API_KEY,
commerceKey: process.env.COINBASE_COMMERCE_API_KEY,
onchainKitKey: process.env.NEXT_PUBLIC_ONCHAINKIT_API_KEY,
nodeEnv: process.env.NODE_ENV,
});

// Add your API key from Coinbase Commerce
export const COINBASE_COMMERCE_API_KEY =
process.env.NEXT_PRIVATE_COINBASE_COMMERCE_API_KEY || '';
process.env.COINBASE_COMMERCE_API_KEY || '';
// use NODE_ENV to not have to change config based on where it's deployed
export const NEXT_PUBLIC_URL =
process.env.NODE_ENV === 'development'
Expand All @@ -24,5 +24,5 @@ if (!NEXT_PUBLIC_ONCHAINKIT_API_KEY) {
}

if (!COINBASE_COMMERCE_API_KEY) {
console.warn('Missing NEXT_PRIVATE_COINBASE_COMMERCE_API_KEY environment variable');
console.warn('Missing COINBASE_COMMERCE_API_KEY environment variable');
}

0 comments on commit ebde620

Please sign in to comment.