Skip to content

Commit 71ba260

Browse files
author
ariyan-hashstack
committed
[strkfarm] refac req
1 parent b432cfd commit 71ba260

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/adaptors/strkfarm/index.js

+3-11
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ const apy = async () => {
66
);
77

88
return apyData.strategies
9-
.filter(strategy => parseFloat(strategy.tvlUsd) > 10000)
9+
.filter(strategy => parseFloat(strategy.tvlUsd) > 0)
1010
.map((strategy) => {
1111
const currTvlUsd = parseFloat(strategy.tvlUsd);
1212
const currPool = strategy.name;
1313
const currPoolId = strategy.id;
1414
const baseApy = (strategy.apySplit.baseApy || 0) * 100;
1515
const rewardsApy = (strategy.apySplit.rewardsApy || 0) * 100;
16-
16+
const rewardTokens = strategy.depositToken.map(token => token.address);
1717
const underlyingTokens = strategy.depositToken.map(token => token.address);
1818
const symbols = strategy.depositToken.map(token => token.symbol).join('-');
1919

@@ -26,21 +26,13 @@ const apy = async () => {
2626
tvlUsd: currTvlUsd,
2727
apyBase: baseApy,
2828
apyReward: rewardsApy,
29+
rewardTokens: rewardTokens,
2930
url: `https://app.strkfarm.com/strategy/${currPoolId}`,
3031
poolMeta: currPool,
3132
};
3233
});
3334
};
3435

35-
apy().then((strategies) => {
36-
strategies.forEach((strategy) => {
37-
console.log(strategy);
38-
console.log('-----------------------------');
39-
});
40-
}).catch((error) => {
41-
console.error('Error fetching strategies:', error);
42-
});
43-
4436
module.exports = {
4537
timetravel: false,
4638
apy: apy,

0 commit comments

Comments
 (0)