diff --git a/.env.example b/.env.example index ba240349..28c8161c 100644 --- a/.env.example +++ b/.env.example @@ -16,6 +16,7 @@ REACT_APP_FORTMATIC_KEY= REACT_APP_OPENSEA_API_KEY= REACT_APP_COLLECTIBLES_SOURCE= REACT_APP_ETHERSCAN_API_KEY= +REACT_APP_ETHGASSTATION_API_KEY= # Versions REACT_APP_LATEST_SAFE_VERSION= diff --git a/.github/workflows/deploy-rinkeby.yml b/.github/workflows/deploy-rinkeby.yml index 4d35a09a..aebd3849 100644 --- a/.github/workflows/deploy-rinkeby.yml +++ b/.github/workflows/deploy-rinkeby.yml @@ -21,6 +21,7 @@ env: REACT_APP_SENTRY_DSN: ${{ secrets.SENTRY_DSN_RINKEBY }} REACT_APP_GOOGLE_ANALYTICS: ${{ secrets.REACT_APP_GOOGLE_ANALYTICS_ID_RINKEBY }} REACT_APP_GNOSIS_APPS_URL: ${{ secrets.REACT_APP_GNOSIS_APPS_URL_PROD }} + REACT_APP_ETHGASSTATION_API_KEY: ${{ secrets.REACT_APP_ETHGASSTATION_API_KEY_RINKEBY }} jobs: debug: diff --git a/src/config/networks/mainnet.ts b/src/config/networks/mainnet.ts index b4333c05..2c404a89 100644 --- a/src/config/networks/mainnet.ts +++ b/src/config/networks/mainnet.ts @@ -1,5 +1,6 @@ import EtherLogo from 'src/config/assets/token_eth.svg' import { EnvironmentSettings, ETHEREUM_NETWORK, NetworkConfig } from 'src/config/networks/network.d' +import { ETHGASSTATION_API_KEY } from 'src/utils/constants' const baseConfig: EnvironmentSettings = { clientGatewayUrl: 'https://safe-client.mainnet.staging.gnosisdev.com/v1', diff --git a/src/config/networks/rinkeby.ts b/src/config/networks/rinkeby.ts index f1ffcc7f..81cedee7 100644 --- a/src/config/networks/rinkeby.ts +++ b/src/config/networks/rinkeby.ts @@ -1,12 +1,13 @@ import EtherLogo from 'src/config/assets/token_eth.svg' import { EnvironmentSettings, ETHEREUM_NETWORK, NetworkConfig, WALLETS } from 'src/config/networks/network.d' +import { ETHGASSTATION_API_KEY } from 'src/utils/constants' const baseConfig: EnvironmentSettings = { clientGatewayUrl: 'https://safe-client.rinkeby.staging.gnosisdev.com/v1', txServiceUrl: 'https://safe-transaction.rinkeby.staging.gnosisdev.com/api/v1', safeAppsUrl: 'https://safe-apps.dev.gnosisdev.com', gasPriceOracle: { - url: 'https://ethgasstation.info/json/ethgasAPI.json', + url: `https://ethgasstation.info/json/ethgasAPI.json?api-key=${ETHGASSTATION_API_KEY}`, gasParameter: 'average', }, rpcServiceUrl: 'https://rinkeby.infura.io:443/v3', diff --git a/src/utils/constants.ts b/src/utils/constants.ts index cc889658..b595eda6 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -23,6 +23,7 @@ export const OPENSEA_API_KEY = process.env.REACT_APP_OPENSEA_API_KEY || '' export const COLLECTIBLES_SOURCE = process.env.REACT_APP_COLLECTIBLES_SOURCE || 'Gnosis' export const TIMEOUT = process.env.NODE_ENV === 'test' ? 1500 : 5000 export const ETHERSCAN_API_KEY = process.env.REACT_APP_ETHERSCAN_API_KEY +export const ETHGASSTATION_API_KEY = process.env.REACT_APP_ETHGASSTATION_API_KEY export const EXCHANGE_RATE_URL = 'https://api.exchangeratesapi.io/latest' export const EXCHANGE_RATE_URL_FALLBACK = 'https://api.coinbase.com/v2/exchange-rates' export const SAFE_APPS_LIST_URL =