From f1430f24e8a9a8e16e588f69d9ddad1376c83892 Mon Sep 17 00:00:00 2001 From: 0xpeluche <0xpeluche@protonmail.com> Date: Mon, 19 Aug 2024 17:48:17 +0200 Subject: [PATCH] fix: Splash --- projects/splash.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/projects/splash.js b/projects/splash.js index 2e4904dd0d04..07bfed1472d3 100644 --- a/projects/splash.js +++ b/projects/splash.js @@ -1,12 +1,9 @@ const { get } = require('./helper/http'); +const ADDRESSES = require('./helper/coreAssets.json') -async function cardanoTVL() { - let { tvlAda } = await get('https://api2.splash.trade/platform-api/v1/platform/stats') - if(tvlAda>1e9){ - throw new Error("wrong") - } - - return { cardano: tvlAda }; +async function cardanoTVL(api) { + const { tvlAda } = await get('https://api2.splash.trade/platform-api/v1/platform/stats') + api.add(ADDRESSES.cardano.ADA, tvlAda) } module.exports = {