Skip to content

Commit

Permalink
attempt fix chromatic env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
albertfolch-redeemeum committed Mar 15, 2024
1 parent a99ce7b commit 95f47cd
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/chromatic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ jobs:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
workingDir: packages/react-kit
env:
INFURA_PROJECT_SECRET: ${{ secrets.INFURA_PROJECT_SECRET }}
REACT_APP_MAGIC_API_KEY: ${{ secrets.REACT_APP_MAGIC_API_KEY }}
STORYBOOK_INFURA_PROJECT_SECRET: ${{ secrets.STORYBOOK_INFURA_PROJECT_SECRET }}
STORYBOOK_REACT_APP_MAGIC_API_KEY: ${{ secrets.STORYBOOK_REACT_APP_MAGIC_API_KEY }}
14 changes: 7 additions & 7 deletions .github/workflows/pin-to-pinata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,52 +34,52 @@ jobs:
env:
PINATA_JWT: ${{ secrets.PINATA_JWT }}
INFURA_PROJECT_ID: ${{ secrets.INFURA_PROJECT_ID }}
INFURA_PROJECT_SECRET: ${{ secrets.INFURA_PROJECT_SECRET }}
STORYBOOK_INFURA_PROJECT_SECRET: ${{ secrets.STORYBOOK_INFURA_PROJECT_SECRET }}
run: |
echo "Pin for testing/mumbai env..."
npm run pin-to-pinata -- \
-e testing \
-c testing-80001-0 \
-fd ${{ env.FROM_DATE }} \
-p ${{ env.PINATA_JWT }} \
-i ${{ env.INFURA_PROJECT_ID }}/${{ env.INFURA_PROJECT_SECRET }}
-i ${{ env.INFURA_PROJECT_ID }}/${{ env.STORYBOOK_INFURA_PROJECT_SECRET }}
echo "Pin for testing/goerli env..."
npm run pin-to-pinata -- \
-e testing \
-c testing-5-0 \
-fd ${{ env.FROM_DATE }} \
-p ${{ env.PINATA_JWT }} \
-i ${{ env.INFURA_PROJECT_ID }}/${{ env.INFURA_PROJECT_SECRET }}
-i ${{ env.INFURA_PROJECT_ID }}/${{ env.STORYBOOK_INFURA_PROJECT_SECRET }}
echo "Pin for staging/mumbai env..."
npm run pin-to-pinata -- \
-e staging \
-c staging-80001-0 \
-fd ${{ env.FROM_DATE }} \
-p ${{ env.PINATA_JWT }} \
-i ${{ env.INFURA_PROJECT_ID }}/${{ env.INFURA_PROJECT_SECRET }}
-i ${{ env.INFURA_PROJECT_ID }}/${{ env.STORYBOOK_INFURA_PROJECT_SECRET }}
echo "Pin for staging/goerli env..."
npm run pin-to-pinata -- \
-e staging \
-c staging-5-0 \
-fd ${{ env.FROM_DATE }} \
-p ${{ env.PINATA_JWT }} \
-i ${{ env.INFURA_PROJECT_ID }}/${{ env.INFURA_PROJECT_SECRET }}
-i ${{ env.INFURA_PROJECT_ID }}/${{ env.STORYBOOK_INFURA_PROJECT_SECRET }}
echo "Pin for production/polygon env..."
npm run pin-to-pinata -- \
-e production \
-c production-137-0 \
-fd ${{ env.FROM_DATE }} \
-p ${{ env.PINATA_JWT }} \
-i ${{ env.INFURA_PROJECT_ID }}/${{ env.INFURA_PROJECT_SECRET }}
-i ${{ env.INFURA_PROJECT_ID }}/${{ env.STORYBOOK_INFURA_PROJECT_SECRET }}
echo "Pin for production/ethereum env..."
npm run pin-to-pinata -- \
-e production \
-c production-1-0 \
-fd ${{ env.FROM_DATE }} \
-p ${{ env.PINATA_JWT }} \
-i ${{ env.INFURA_PROJECT_ID }}/${{ env.INFURA_PROJECT_SECRET }}
-i ${{ env.INFURA_PROJECT_ID }}/${{ env.STORYBOOK_INFURA_PROJECT_SECRET }}
4 changes: 2 additions & 2 deletions packages/react-kit/.env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
REACT_APP_WALLET_CONNECT_PROJECT_ID=
REACT_APP_MAGIC_API_KEY=
INFURA_PROJECT_SECRET=
STORYBOOK_REACT_APP_MAGIC_API_KEY=
STORYBOOK_INFURA_PROJECT_SECRET=
STORYBOOK_DATA_TOKENS_LIST=
STORYBOOK_DATA_ENV_NAME=
STORYBOOK_DATA_SELLER_ID=
Expand Down
8 changes: 4 additions & 4 deletions packages/react-kit/src/lib/config/config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { getRpcUrls } from "../const/networks";

const magicLinkKey = process.env.REACT_APP_MAGIC_API_KEY;
const magicLinkKey = process.env.STORYBOOK_REACT_APP_MAGIC_API_KEY;
if (!magicLinkKey) {
throw new Error("REACT_APP_MAGIC_API_KEY is not defined");
throw new Error("STORYBOOK_REACT_APP_MAGIC_API_KEY is not defined");
}
const infuraKey = process.env.INFURA_PROJECT_SECRET;
const infuraKey = process.env.STORYBOOK_INFURA_PROJECT_SECRET;
if (!infuraKey) {
throw new Error("INFURA_PROJECT_SECRET is not defined");
throw new Error("STORYBOOK_INFURA_PROJECT_SECRET is not defined");
}

export const CONFIG = {
Expand Down

0 comments on commit 95f47cd

Please sign in to comment.