From d2d231f865531a09409fb162451243ff2d83a451 Mon Sep 17 00:00:00 2001 From: Albert Folch Date: Fri, 15 Mar 2024 16:44:43 +0100 Subject: [PATCH] fix: env names --- 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 = {