From 9de2eacf2e951939f787f33da6e3f7e5467fd877 Mon Sep 17 00:00:00 2001 From: rasguy92 Date: Tue, 5 Dec 2023 01:40:14 +0700 Subject: [PATCH] fixup! feat: deploy beta --- .env.development | 3 ++- .github/workflows/build.yml | 2 ++ src/libs/wagmi/index.ts | 8 +++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.env.development b/.env.development index 220fb88..3dc33ca 100644 --- a/.env.development +++ b/.env.development @@ -3,7 +3,8 @@ VITE_REDUX_DEBUG=true GSAP_TOKEN=5b8296c2-d882-401b-be86-87707a83f99d NPM_TOKEN=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 VITE_BACKEND_API_URL=https://app.wega.fun/api -VITE_RPC_PROVIDER_ALCHEMY=y9Gx-Wglr_8PQ67heuNUZ18rwoUEip9B +VITE_RPC_PROVIDER_ALCHEMY=zqj7FXkgFTrZjhGggaNd5qEeQmMjjdRl +VITE_RPC_PROVIDER_ALCHEMY_MUMBAI=y9Gx-Wglr_8PQ67heuNUZ18rwoUEip9B VITE_WALLET_CONNECT_ID=210ab6fbbd6f9d07fd69a357b4c39a13 # FIREBASE CONFIG diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 49aaca5..03b82b4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -35,6 +35,7 @@ jobs: VITE_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.VITE_FIREBASE_MESSAGING_SENDER_ID }} VITE_FIREBASE_APP_ID: ${{ secrets.VITE_FIREBASE_APP_ID }} VITE_BACKEND_API_URL: ${{ vars.VITE_BACKEND_API_URL }} + VITE_RPC_PROVIDER_ALCHEMY_MUMBAI: ${{ secrets.VITE_RPC_PROVIDER_ALCHEMY_MUMBAI }} run: | echo "REF=$REF" @@ -73,6 +74,7 @@ jobs: VITE_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.VITE_FIREBASE_MESSAGING_SENDER_ID }} VITE_FIREBASE_APP_ID: ${{ secrets.VITE_FIREBASE_APP_ID }} VITE_BACKEND_API_URL: ${{ vars.VITE_BACKEND_API_URL }} + VITE_RPC_PROVIDER_ALCHEMY_MUMBAI: ${{ secrets.VITE_RPC_PROVIDER_ALCHEMY_MUMBAI }} run: | # cp .env.qa .env diff --git a/src/libs/wagmi/index.ts b/src/libs/wagmi/index.ts index 991c7d3..1f9df68 100644 --- a/src/libs/wagmi/index.ts +++ b/src/libs/wagmi/index.ts @@ -2,20 +2,22 @@ import '@rainbow-me/rainbowkit/styles.css'; import { getDefaultWallets, connectorsForWallets } from '@rainbow-me/rainbowkit'; import { configureChains, createConfig } from 'wagmi'; import { getNetwork, Chain, waitForTransaction, writeContract, readContract, prepareWriteContract } from '@wagmi/core'; -import { localhost, polygonMumbai } from 'wagmi/chains'; +import { polygonMumbai } from 'wagmi/chains'; import { alchemyProvider } from 'wagmi/providers/alchemy'; import { publicProvider } from 'wagmi/providers/public'; import { HexishString } from '../../models'; import { tokenConfig, escrowConfig, gameControllerConfig, wegaRandomizerControllerConfig } from "../../utils"; import { feeManagerConfig } from '../../utils/abis'; +import { defaultNetwork } from '../../models/constants'; const { chains, publicClient } = configureChains( - [polygonMumbai, localhost], + [defaultNetwork, polygonMumbai], [ alchemyProvider({ apiKey: import.meta.env.VITE_RPC_PROVIDER_ALCHEMY as string }), - publicProvider() + alchemyProvider({ apiKey: import.meta.env.VITE_RPC_PROVIDER_ALCHEMY_MUMBAI as string }), + publicProvider(), ] ); const projectId = import.meta.env.VITE_WALLET_CONNECT_ID as string;