From ebde620518157e3c32b974fd0489b17d6fcd0db3 Mon Sep 17 00:00:00 2001 From: Paul Cramer Date: Tue, 10 Dec 2024 14:07:40 -0800 Subject: [PATCH] refactor --- README.md | 2 +- src/config.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a910cd6..74ecb5d 100644 --- a/README.md +++ b/README.md @@ -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" ```
diff --git a/src/config.ts b/src/config.ts index 05531f8..e98f922 100644 --- a/src/config.ts +++ b/src/config.ts @@ -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' @@ -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'); }