From de03dbb082f5a73bc7d0505c2e0928a66af013e8 Mon Sep 17 00:00:00 2001 From: Jay Welsh Date: Tue, 31 Oct 2023 15:09:59 +0200 Subject: [PATCH] chore(DappProvider): enable quicknode migration --- .github/workflows/workflow-dev.yml | 4 ++-- .github/workflows/workflow-prod.yml | 4 ++-- src/components/DappProvider.tsx | 8 ++++++-- src/components/DappReactiveConfig.tsx | 8 ++++++-- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/workflow-dev.yml b/.github/workflows/workflow-dev.yml index 7dce1e6..458d98e 100644 --- a/.github/workflows/workflow-dev.yml +++ b/.github/workflows/workflow-dev.yml @@ -11,8 +11,8 @@ jobs: env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - REACT_APP_ALCHEMY_RPC_URL_MAINNET: ${{ secrets.REACT_APP_ALCHEMY_RPC_URL_MAINNET }} - REACT_APP_ALCHEMY_RPC_URL_ARBITRUM: ${{ secrets.REACT_APP_ALCHEMY_RPC_URL_ARBITRUM }} + REACT_APP_QUICKNODE_RPC_URL_MAINNET: ${{ secrets.REACT_APP_QUICKNODE_RPC_URL_MAINNET }} + REACT_APP_QUICKNODE_RPC_URL_ARBITRUM: ${{ secrets.REACT_APP_QUICKNODE_RPC_URL_ARBITRUM }} REACT_APP_ENV: ${{ vars.REACT_APP_ENV }} steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/workflow-prod.yml b/.github/workflows/workflow-prod.yml index 0e262f2..87027dc 100644 --- a/.github/workflows/workflow-prod.yml +++ b/.github/workflows/workflow-prod.yml @@ -11,8 +11,8 @@ jobs: env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - REACT_APP_ALCHEMY_RPC_URL_MAINNET: ${{ secrets.REACT_APP_ALCHEMY_RPC_URL_MAINNET }} - REACT_APP_ALCHEMY_RPC_URL_ARBITRUM: ${{ secrets.REACT_APP_ALCHEMY_RPC_URL_ARBITRUM }} + REACT_APP_QUICKNODE_RPC_URL_MAINNET: ${{ secrets.REACT_APP_QUICKNODE_RPC_URL_MAINNET }} + REACT_APP_QUICKNODE_RPC_URL_ARBITRUM: ${{ secrets.REACT_APP_QUICKNODE_RPC_URL_ARBITRUM }} REACT_APP_ENV: ${{ vars.REACT_APP_ENV }} steps: - uses: actions/checkout@v3 diff --git a/src/components/DappProvider.tsx b/src/components/DappProvider.tsx index b554321..58d56a2 100644 --- a/src/components/DappProvider.tsx +++ b/src/components/DappProvider.tsx @@ -19,7 +19,9 @@ const DappProvider = (props: PropsFromRedux) => { } const mainnetReadOnlyUrl = () => { - if(process.env.REACT_APP_INFURA_RPC_URL_MAINNET) { + if (process.env.REACT_APP_QUICKNODE_RPC_URL_MAINNET) { + return process.env.REACT_APP_QUICKNODE_RPC_URL_MAINNET; + } else if(process.env.REACT_APP_INFURA_RPC_URL_MAINNET) { return `${process.env.REACT_APP_INFURA_RPC_URL_MAINNET}`; } else if(process.env.REACT_APP_ALCHEMY_RPC_URL_MAINNET) { return `${process.env.REACT_APP_ALCHEMY_RPC_URL_MAINNET}`; @@ -28,7 +30,9 @@ const DappProvider = (props: PropsFromRedux) => { } const arbitrumReadOnlyUrl = () => { - if(process.env.REACT_APP_INFURA_RPC_URL_ARBITRUM) { + if(process.env.REACT_APP_QUICKNODE_RPC_URL_ARBITRUM) { + return `${process.env.REACT_APP_QUICKNODE_RPC_URL_ARBITRUM}`; + } else if(process.env.REACT_APP_INFURA_RPC_URL_ARBITRUM) { return `${process.env.REACT_APP_INFURA_RPC_URL_ARBITRUM}`; } else if(process.env.REACT_APP_ALCHEMY_RPC_URL_ARBITRUM) { return `${process.env.REACT_APP_ALCHEMY_RPC_URL_ARBITRUM}`; diff --git a/src/components/DappReactiveConfig.tsx b/src/components/DappReactiveConfig.tsx index 7abd24b..3ae62b8 100644 --- a/src/components/DappReactiveConfig.tsx +++ b/src/components/DappReactiveConfig.tsx @@ -26,7 +26,9 @@ const DappReactiveConfig = (props: PropsFromRedux) => { } const mainnetReadOnlyUrl = () => { - if(process.env.REACT_APP_INFURA_RPC_URL_MAINNET) { + if (process.env.REACT_APP_QUICKNODE_RPC_URL_MAINNET) { + return process.env.REACT_APP_QUICKNODE_RPC_URL_MAINNET; + } else if(process.env.REACT_APP_INFURA_RPC_URL_MAINNET) { return `${process.env.REACT_APP_INFURA_RPC_URL_MAINNET}`; } else if(process.env.REACT_APP_ALCHEMY_RPC_URL_MAINNET) { return `${process.env.REACT_APP_ALCHEMY_RPC_URL_MAINNET}`; @@ -35,7 +37,9 @@ const DappReactiveConfig = (props: PropsFromRedux) => { } const arbitrumReadOnlyUrl = () => { - if(process.env.REACT_APP_INFURA_RPC_URL_ARBITRUM) { + if(process.env.REACT_APP_QUICKNODE_RPC_URL_ARBITRUM) { + return `${process.env.REACT_APP_QUICKNODE_RPC_URL_ARBITRUM}`; + } else if(process.env.REACT_APP_INFURA_RPC_URL_ARBITRUM) { return `${process.env.REACT_APP_INFURA_RPC_URL_ARBITRUM}`; } else if(process.env.REACT_APP_ALCHEMY_RPC_URL_ARBITRUM) { return `${process.env.REACT_APP_ALCHEMY_RPC_URL_ARBITRUM}`;