diff --git a/src/adaptors/avantis/index.js b/src/adaptors/avantis/index.js index fd83252127..51ec444ed3 100644 --- a/src/adaptors/avantis/index.js +++ b/src/adaptors/avantis/index.js @@ -98,7 +98,7 @@ const fetchTransfersForFeeDistributedIds = async (ids) => { }; const main = async (timestamp = null) => { - timestamp = timestamp ? timestamp : Math.floor(Date.now() / 1000); + timestamp = timestamp ? parseInt(timestamp) : Math.floor(Date.now() / 1000); // Get total fees distributed for junior and senior tranches const feesDistributedIds = await fetchFeeDistributedIds(timestamp); @@ -106,8 +106,6 @@ const main = async (timestamp = null) => { feesDistributedIds ); - console.log(totalJunior, totalSenior); - const [block] = await getBlocksByTime([timestamp], 'base'); // Get TVL for junior and senior tranches @@ -117,14 +115,14 @@ const main = async (timestamp = null) => { target: ADDRESSES.base.USDC, params: [ADDRESSES.base.AvantisJuniorTranche], chain: 'base', - block: block.height, + block: block, }), sdk.api.abi.call({ abi: 'erc20:balanceOf', target: ADDRESSES.base.USDC, params: [ADDRESSES.base.AvantisSeniorTranche], chain: 'base', - block: block.height, + block: block, }), ]);