From f97ea9ce906ce4bc98eac62ec1c2c13fd25239b7 Mon Sep 17 00:00:00 2001 From: Ludovic Levalleux Date: Thu, 5 Oct 2023 15:24:29 +0100 Subject: [PATCH] fix: IPFS gateway is not set up in configuration --- .env.example | 3 +++ .fleek.json | 23 ----------------------- .github/workflows/ci_reusable.yaml | 1 + src/components/widgets/redeem/Redeem.tsx | 1 + src/config.ts | 7 ++++++- 5 files changed, 11 insertions(+), 24 deletions(-) delete mode 100644 .fleek.json diff --git a/.env.example b/.env.example index 97b6b53..108c521 100644 --- a/.env.example +++ b/.env.example @@ -3,6 +3,9 @@ REACT_APP_ENV_NAME=testing # REACT_APP_ENV_NAME=staging # REACT_APP_ENV_NAME=production +# IPFS Gateway +REACT_APP_IPFS_GATEWAY=https://bosonprotocol.infura-ipfs.io/ipfs + # Infura IPFS project ID, used for auth header REACT_APP_INFURA_IPFS_PROJECT_ID= diff --git a/.fleek.json b/.fleek.json deleted file mode 100644 index 6d6c7b8..0000000 --- a/.fleek.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "build": { - "environment": { - "REACT_APP_DEFAULT_TOKENS_LIST_TESTING": "[{\"symbol\":\"MATIC\",\"name\":\"MATIC\",\"address\":\"0x0000000000000000000000000000000000000000\",\"decimals\":\"18\"},{\"symbol\":\"WETH\",\"name\":\"Wrapped Ether\",\"address\":\"0xA6FA4fB5f76172d178d61B04b0ecd319C5d1C0aa\",\"decimals\":\"18\"},{\"symbol\":\"BOSON\",\"name\":\"Boson Token (PoS)\",\"address\":\"0x1f5431E8679630790E8EbA3a9b41d1BB4d41aeD0\",\"decimals\":\"18\"},{\"symbol\":\"USDC\",\"name\":\"Mumbai USD Coin\",\"address\":\"0xe6b8a5CF854791412c1f6EFC7CAf629f5Df1c747\",\"decimals\":\"6\"},{\"symbol\":\"DAI\",\"name\":\"DAI\",\"address\":\"0x001b3b4d0f3714ca98ba10f6042daebf0b1b7b6f\",\"decimals\":\"18\"},{\"symbol\":\"USDT\",\"name\":\"Tether USD\",\"address\":\"0xA02f6adc7926efeBBd59Fd43A84f4E0c0c91e832\",\"decimals\":\"6\"}]", - "REACT_APP_DEFAULT_TOKENS_LIST_STAGING": "[{\"symbol\":\"MATIC\",\"name\":\"MATIC\",\"address\":\"0x0000000000000000000000000000000000000000\",\"decimals\":\"18\"},{\"symbol\":\"WETH\",\"name\":\"Wrapped Ether\",\"address\":\"0xA6FA4fB5f76172d178d61B04b0ecd319C5d1C0aa\",\"decimals\":\"18\"},{\"symbol\":\"BOSON\",\"name\":\"Boson Token (PoS)\",\"address\":\"0x1f5431E8679630790E8EbA3a9b41d1BB4d41aeD0\",\"decimals\":\"18\"},{\"symbol\":\"USDC\",\"name\":\"Mumbai USD Coin\",\"address\":\"0xe6b8a5CF854791412c1f6EFC7CAf629f5Df1c747\",\"decimals\":\"6\"},{\"symbol\":\"DAI\",\"name\":\"DAI\",\"address\":\"0x001b3b4d0f3714ca98ba10f6042daebf0b1b7b6f\",\"decimals\":\"18\"},{\"symbol\":\"USDT\",\"name\":\"Tether USD\",\"address\":\"0xA02f6adc7926efeBBd59Fd43A84f4E0c0c91e832\",\"decimals\":\"6\"}]", - "REACT_APP_DEFAULT_TOKENS_LIST_PRODUCTION": "[{\"symbol\":\"MATIC\",\"name\":\"MATIC\",\"address\":\"0x0000000000000000000000000000000000000000\",\"decimals\":\"18\"},{\"symbol\":\"WETH\",\"name\":\"Wrapped Ether\",\"address\":\"0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619\",\"decimals\":\"18\"},{\"symbol\":\"BOSON\",\"name\":\"Boson Token (PoS)\",\"address\":\"0x9B3B0703D392321AD24338Ff1f846650437A43C9\",\"decimals\":\"18\"},{\"symbol\":\"USDC\",\"name\":\"USD Coin (PoS)\",\"address\":\"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174\",\"decimals\":\"6\"},{\"symbol\":\"DAI\",\"name\":\"(PoS) Dai Stablecoin\",\"address\":\"0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063\",\"decimals\":\"18\"},{\"symbol\":\"USDT\",\"name\":\"(PoS) Tether USD\",\"address\":\"0xc2132D05D31c914a87C6611C10748AEb04B58e8F\",\"decimals\":\"6\"}]", - "REACT_APP_DEFAULT_DISPUTE_RESOLVER_ID_TESTING": "13", - "REACT_APP_DEFAULT_DISPUTE_RESOLVER_ID_STAGING": "2", - "REACT_APP_DEFAULT_DISPUTE_RESOLVER_ID_PRODUCTION": "1", - "REACT_APP_DEFAULT_DISPUTE_PERIOD_DAYS": "30", - "REACT_APP_DEFAULT_RESOLUTION_PERIOD_DAYS": "15", - "REACT_APP_CONTACT_SELLER_FOR_EXCHANGE_TESTING": "https://interface-test.on.fleek.co/#/chat/{id}", - "REACT_APP_CONTACT_SELLER_FOR_EXCHANGE_STAGING": "https://interface-staging.on.fleek.co/#/chat/{id}", - "REACT_APP_CONTACT_SELLER_FOR_EXCHANGE_PRODUCTION": "https://bosonapp.io/#/chat/{id}", - "REACT_APP_RAISE_DISPUTE_FOR_EXCHANGE_TESTING": "https://drcenter-test.on.fleek.co/#/exchange/{id}/raise-dispute", - "REACT_APP_RAISE_DISPUTE_FOR_EXCHANGE_STAGING": "https://drcenter-staging.on.fleek.co/#/exchange/{id}/raise-dispute", - "REACT_APP_RAISE_DISPUTE_FOR_EXCHANGE_PRODUCTION": "https://drcenter-production.on.fleek.co/#/exchange/{id}/raise-dispute", - "REACT_APP_BUYER_SELLER_AGREEMENT_TEMPLATE": "ipfs://QmXfDShmggHm7BzMbkzv2rRowwPyJ55mypGp32qKSPGto4", - "REACT_APP_RNFT_LICENSE_TEMPLATE": "ipfs://QmUxAXqM6smDYj7TvS9oDe5kRoAVmkqcyWCKEeNsD6JA97", - "REACT_APP_FAIR_EXCHANGE_POLICY_RULES": "ipfs://QmV3Wy2wmrFdEXzhyhvvaW25Q8w2wTd2UypFVyhwsdBE8T" - } - } -} \ No newline at end of file diff --git a/.github/workflows/ci_reusable.yaml b/.github/workflows/ci_reusable.yaml index e768d14..1cf549e 100644 --- a/.github/workflows/ci_reusable.yaml +++ b/.github/workflows/ci_reusable.yaml @@ -66,6 +66,7 @@ jobs: REACT_APP_RAISE_DISPUTE_FOR_EXCHANGE_TESTING: "https://drcenter-test.on.fleek.co/#/exchange/{id}/raise-dispute" REACT_APP_RAISE_DISPUTE_FOR_EXCHANGE_STAGING: "https://drcenter-staging.on.fleek.co/#/exchange/{id}/raise-dispute" REACT_APP_RAISE_DISPUTE_FOR_EXCHANGE_PRODUCTION: "https://disputes.bosonprotocol.io/#/exchange/{id}/raise-dispute" + REACT_APP_IPFS_GATEWAY: "https://bosonprotocol.infura-ipfs.io/ipfs" REACT_APP_BUYER_SELLER_AGREEMENT_TEMPLATE: "ipfs://QmQ8ZTmmRV15rFaWG9KRyjFRrpaD1o2sDwZoYiWgBaAto6" REACT_APP_RNFT_LICENSE_TEMPLATE: "ipfs://QmeVkdpKbfHKrPb9tXDXUoPEResEanGpcGANfAjb8bUQYT" REACT_APP_FAIR_EXCHANGE_POLICY_RULES: "ipfs://QmNqhFGr9NUEMqz3oQC7yUqJG9mt4NZEpV5MCeemVMTSRs" diff --git a/src/components/widgets/redeem/Redeem.tsx b/src/components/widgets/redeem/Redeem.tsx index 628c9ee..9a8c42c 100644 --- a/src/components/widgets/redeem/Redeem.tsx +++ b/src/components/widgets/redeem/Redeem.tsx @@ -58,6 +58,7 @@ export function Redeem() { licenseTemplate={CONFIG.licenseTemplate as string} defaultCurrencyTicker="USD" defaultCurrencySymbol="$" + ipfsGateway={CONFIG.ipfsGateway as string} ipfsProjectId={CONFIG.ipfsProjectId} ipfsProjectSecret={CONFIG.ipfsProjectSecret} children={<>} diff --git a/src/config.ts b/src/config.ts index 72dc297..9fe9649 100644 --- a/src/config.ts +++ b/src/config.ts @@ -19,7 +19,8 @@ type ConfigFields = | "walletConnectProjectId" | "metaTxApiKey" | "metaTxApiIds" - | "raiseDisputeForExchange"; + | "raiseDisputeForExchange" + | "ipfsGateway"; const envSuffixes: Record = { testing: "_TESTING", @@ -95,6 +96,10 @@ const EnvVariables: Array<{ envVar: "REACT_APP_RAISE_DISPUTE_FOR_EXCHANGE", envDependent: true, configField: "raiseDisputeForExchange" + }, + { + envVar: "REACT_APP_IPFS_GATEWAY", + configField: "ipfsGateway" } ];