Skip to content

Commit bf0e754

Browse files
committed
chore: remove console.logs and try from EVO adapter; add FA supra within coreAssets
1 parent 9ffdf54 commit bf0e754

File tree

2 files changed

+7
-17
lines changed

2 files changed

+7
-17
lines changed

projects/evo/index.js

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,12 @@ const getPoolIds = async chain => {
3232
* @returns {Promise<Object|null>} - Pool data or null if error
3333
*/
3434
const getPoolData = async (poolId, chain) => {
35-
try {
36-
const result = await invokeViewFunction(
37-
GET_POOL_VIEW_FUNCTION,
38-
[],
39-
[poolId]
40-
);
41-
return result[0];
42-
} catch (error) {
43-
console.error(`Error fetching data for pool ${poolId}: ${error.message}`);
44-
return null;
45-
}
35+
const result = await invokeViewFunction(
36+
GET_POOL_VIEW_FUNCTION,
37+
[],
38+
[poolId]
39+
);
40+
return result[0];
4641
};
4742

4843
module.exports = {
@@ -51,24 +46,18 @@ module.exports = {
5146
supra: {
5247
tvl: async api => {
5348
const poolIds = await getPoolIds(api.chain);
54-
console.log("poolIds: ", poolIds)
5549
// Process pools in parallel for better performance
5650
const poolDataPromises = poolIds.map(id => getPoolData(id, api.chain));
5751
const poolsData = await Promise.all(poolDataPromises);
5852

59-
console.log("poolsData: ", poolsData)
60-
6153
// Add token reserves to TVL
6254
poolsData.forEach(pool => {
6355
if (pool) {
64-
console.log('Adding token:', pool.token_0, 'with reserve:', pool.token_0_reserve);
6556
api.add(pool.token_0, pool.token_0_reserve);
66-
console.log('Adding token:', pool.token_1, 'with reserve:', pool.token_1_reserve);
6757
api.add(pool.token_1, pool.token_1_reserve);
6858
}
6959
});
7060

71-
console.log('Final balances:', api.getBalances());
7261
}
7362
}
7463
};

projects/helper/coreAssets.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2527,6 +2527,7 @@
25272527
},
25282528
"supra": {
25292529
"SUPRA": "0x1::supra_coin::SupraCoin",
2530+
"SUPRA_1": "0xa",
25302531
"dexUSDC": "0x8f7d16ade319b0fce368ca6cdb98589c4527ce7f5b51e544a9e68e719934458b::hyper_coin::DexlynUSDC"
25312532
},
25322533
"prom": {

0 commit comments

Comments
 (0)