From 1c74a49fb281a720e5e7fd628a55d34b9807dfa1 Mon Sep 17 00:00:00 2001 From: 0xngmi <0xngmi@protonmail.com> Date: Sun, 29 Oct 2023 23:51:58 +0000 Subject: [PATCH] fix cbeth tvl --- src/adaptors/coinbase-wrapped-staked-eth/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/adaptors/coinbase-wrapped-staked-eth/index.js b/src/adaptors/coinbase-wrapped-staked-eth/index.js index 4d160ee7e5..c5938e9203 100644 --- a/src/adaptors/coinbase-wrapped-staked-eth/index.js +++ b/src/adaptors/coinbase-wrapped-staked-eth/index.js @@ -6,8 +6,7 @@ const token = '0xBe9895146f7AF43049ca1c1AE358B0541Ea49704'; const weth = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'; const getApy = async () => { - const tvl = - (await sdk.api.erc20.totalSupply({ target: token })).output / 1e18; + const tvl = (await axios.get("https://api.exchange.coinbase.com/wrapped-assets/CBETH")).data.circulating_supply const timestamp1dayAgo = Math.floor(Date.now() / 1000) - 86400; const duration = 1; // day