From fc972d2a83cca5a88d995a87fb768046d0a471b0 Mon Sep 17 00:00:00 2001 From: albertfolch-redeemeum <102516373+albertfolch-redeemeum@users.noreply.github.com> Date: Fri, 15 Mar 2024 16:45:03 +0100 Subject: [PATCH] fix: env names (#681) --- packages/react-kit/src/lib/config/config.ts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/packages/react-kit/src/lib/config/config.ts b/packages/react-kit/src/lib/config/config.ts index 4861e8f64..af8e085ca 100644 --- a/packages/react-kit/src/lib/config/config.ts +++ b/packages/react-kit/src/lib/config/config.ts @@ -1,12 +1,21 @@ import { getRpcUrls } from "../const/networks"; -const magicLinkKey = process.env.STORYBOOK_REACT_APP_MAGIC_API_KEY; +const magicLinkKey = + process.env.STORYBOOK_REACT_APP_MAGIC_API_KEY || + process.env.REACT_APP_MAGIC_API_KEY; if (!magicLinkKey) { - throw new Error("STORYBOOK_REACT_APP_MAGIC_API_KEY is not defined"); + throw new Error( + "STORYBOOK_REACT_APP_MAGIC_API_KEY/REACT_APP_MAGIC_API_KEY is not defined" + ); } -const infuraKey = process.env.STORYBOOK_INFURA_PROJECT_SECRET; +const infuraKey = + process.env.STORYBOOK_INFURA_PROJECT_SECRET || + process.env.INFURA_PROJECT_SECRET || + process.env.REACT_APP_INFURA_IPFS_PROJECT_SECRET; if (!infuraKey) { - throw new Error("STORYBOOK_INFURA_PROJECT_SECRET is not defined"); + throw new Error( + "STORYBOOK_INFURA_PROJECT_SECRET/INFURA_PROJECT_SECRET/REACT_APP_INFURA_IPFS_PROJECT_SECRET is not defined" + ); } export const CONFIG = {