From c12a4a453673d59153402536ba28be088f64f8d8 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 9 Jan 2024 19:06:29 -0300 Subject: [PATCH] add url param to web3modal (#659) * add url param to web3modal * setup the rigth domain for each env --- .github/workflows/build.yml | 4 ++++ .github/workflows/preview.yml | 1 + .github/workflows/production.yml | 1 + .github/workflows/testnet.yml | 1 + apps/rewards-dashboard/src/providers/Web3Provider.tsx | 3 +-- 5 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0e5cd3026..e4ac8bf44 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,6 +22,9 @@ on: default: Cloudflare-Preview public-url: type: string + app-domain: + type: string + default: "portalbridge.com" wac-url: type: string default: "https://wac.staging.gfx.town" @@ -158,6 +161,7 @@ jobs: PUBLIC_URL: ${{ inputs.public-url }} VITE_WAC_URL: ${{ inputs.wac-url }} VITE_APP_WALLET_CONNECT_PROJECT_ID: ${{ secrets.REACT_APP_WALLET_CONNECT_PROJECT_ID }} + VITE_APP_DOMAIN: ${{ inputs.app-domain }} run: | pushd apps/rewards-dashboard npm ci diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 343d8932c..7b8536518 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -26,6 +26,7 @@ jobs: public-url: "/${{ needs.branch-sha.outputs.value }}" wac-url: "https://wac.gfx.xyz" project-branch: ${{ github.event.pull_request.head.ref }} + app-domain: preview.portalbridge.com secrets: inherit needs: - branch-sha diff --git a/.github/workflows/production.yml b/.github/workflows/production.yml index 86a856c32..b9c3aceed 100644 --- a/.github/workflows/production.yml +++ b/.github/workflows/production.yml @@ -33,4 +33,5 @@ jobs: project-branch: main public-url: '' wac-url: "https://wac.gfx.xyz" + app-domain: portalbridge.com secrets: inherit diff --git a/.github/workflows/testnet.yml b/.github/workflows/testnet.yml index ec3c689ca..5fc23922d 100644 --- a/.github/workflows/testnet.yml +++ b/.github/workflows/testnet.yml @@ -25,6 +25,7 @@ jobs: environment: Cloudflare-Testnet public-url: "/${{ needs.branch-sha.outputs.value }}" project-branch: ${{ github.event.pull_request.head.ref }} + app-domain: testnet.portalbridge.com secrets: inherit needs: - branch-sha diff --git a/apps/rewards-dashboard/src/providers/Web3Provider.tsx b/apps/rewards-dashboard/src/providers/Web3Provider.tsx index 7d0dfcf34..98e479f35 100644 --- a/apps/rewards-dashboard/src/providers/Web3Provider.tsx +++ b/apps/rewards-dashboard/src/providers/Web3Provider.tsx @@ -14,11 +14,10 @@ const projectId = envProjectId ? envProjectId : "dummy-wc-key"; -// TODO: const metadata = { name: "Wormhole USDC rewards ", description: "Wormhole USDC Rewards", - //url: `https://portalbridge.com${BASE_URL ? BASE_URL : ""}`, + url: import.meta.env.VITE_APP_DOMAIN || 'portalbridge.com', icons: [`https://portalbridge.com/favicon.ico`], }; const theseChains = [...CHAINS_LIST];