Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/adaptors/indigo/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { get, post } = require('./http-helper')
const utils = require('../utils')

const CARDANO_COINGECKO = {
iUSD: 'coingecko:iusd',
Expand Down Expand Up @@ -66,10 +67,11 @@ async function fetchAssetAnalytics(assetName) {
}

// Fetch the ADA price in USD
// (the analytics /api/price endpoint returns 500, which zeroed tvlUsd for every pool)
async function fetchAdaPriceToUsd() {
try {
const response = await get('https://analytics.indigoprotocol.io/api/price?from=ADA&to=USD');
return response.price;
const response = await utils.getPriceApiData('/prices/current/coingecko:cardano');
return response.coins['coingecko:cardano'].price;
} catch (error) {
console.error('Error fetching ADA price:', error);
return 0;
Expand Down
1 change: 0 additions & 1 deletion src/utils/exclude.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,6 @@ const excludedProtocols = [
{ id: '2992', slug: 'gravita-protocol' },
{ id: '6761', slug: 'sendit' },
{ id: '5746', slug: 'beraborrow' },
{ id: '2309', slug: 'indigo' },
{ id: '4818', slug: 'bitu-protocol' },
{ id: '3068', slug: 'raft' },
{ id: '6681', slug: 'aimstrong' },
Expand Down
Loading