Skip to content

Commit

Permalink
Remove: coingecko url and demo key
Browse files Browse the repository at this point in the history
  • Loading branch information
gergana95 committed Feb 14, 2024
1 parent 471b324 commit d74c1db
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
1 change: 0 additions & 1 deletion .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,3 @@ TRANSAK_API_KEY=85fdedd7-0077-4c6d-8499-52039c64353c

REACT_APP_VISUAL_ENV=dev
INLINE_RUNTIME_CHUNK=false
REACT_APP_COINGECKO_API_DEMO_KEY=
3 changes: 1 addition & 2 deletions .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ TRANSAK_ENV=PRODUCTION
TRANSAK_API_KEY=85fdedd7-0077-4c6d-8499-52039c64353c
TSC_COMPILE_ON_ERROR=true
REACT_APP_CONSTANTS_ENDPOINT=https://jason.ambire.com
INLINE_RUNTIME_CHUNK=false
REACT_APP_COINGECKO_API_DEMO_KEY=
INLINE_RUNTIME_CHUNK=false
3 changes: 1 addition & 2 deletions src/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,4 @@ export const SUSHI_SWAP_FRAME_EXCEPTIONS = process.env.REACT_APP_SUSHI_SWAP_FRAM
: {}
export const SIGNATURE_VERIFIER_DEBUGGER =
(process.env.REACT_APP_SIGNATURE_VERIFIER_DEBUGGER * 1 && true) || false
export const COINGECKO_API_URL = process.env.COINGECKO_API_URL || 'https://api.coingecko.com/api/v3'
export const COINGECKO_API_DEMO_KEY = process.env.REACT_APP_COINGECKO_API_DEMO_KEY
export const COINGECKO_API_URL = process.env.COINGECKO_API_URL || 'https://cena.ambire.com/api/v3'
8 changes: 4 additions & 4 deletions src/hooks/portfolio.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { usePageVisibility } from 'react-page-visibility'
import usePortfolioCommon from 'ambire-common/src/hooks/usePortfolio'

import { fetchGet } from 'lib/fetch'
import { ZAPPER_API_ENDPOINT, VELCRO_API_ENDPOINT, COINGECKO_API_URL, COINGECKO_API_DEMO_KEY } from 'config'
import { ZAPPER_API_ENDPOINT, VELCRO_API_ENDPOINT, COINGECKO_API_URL } from 'config'
import { useToasts } from 'hooks/toasts'
import useConstants from './useConstants'
import useDbCacheStorage from './useCacheStorage'
Expand All @@ -27,12 +27,12 @@ const getBalances = (network, address, provider, quickResponse) => {
}

const getCoingeckoPrices = (addresses) =>
fetchGet(`${COINGECKO_API_URL}/simple/price?ids=${addresses}&vs_currencies=usd&x_cg_demo_api_key=${COINGECKO_API_DEMO_KEY}`)
fetchGet(`${COINGECKO_API_URL}/simple/price?ids=${addresses}&vs_currencies=usd`)

const getCoingeckoPriceByContract = (id, addresses) =>
fetchGet(`${COINGECKO_API_URL}/coins/${id}/contract/${addresses}?x_cg_demo_api_key=${COINGECKO_API_DEMO_KEY}`)
fetchGet(`${COINGECKO_API_URL}/coins/${id}/contract/${addresses}`)

const getCoingeckoCoin = (id) => fetchGet(`${COINGECKO_API_URL}/coins/${id}?x_cg_demo_api_key=${COINGECKO_API_DEMO_KEY}`)
const getCoingeckoCoin = (id) => fetchGet(`${COINGECKO_API_URL}/coins/${id}`)

export default function usePortfolio({
currentNetwork,
Expand Down

0 comments on commit d74c1db

Please sign in to comment.