Skip to content

Commit

Permalink
fix: type capability for calculateRewardApy func
Browse files Browse the repository at this point in the history
  • Loading branch information
murka committed Dec 30, 2024
1 parent 41c3ed5 commit ce2df84
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/adaptors/evaa-protocol/rewardApy.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ function calculateRewardApy(distributionsResp, pool, data, prices) {
const rewardsAssetData = data.assetsData.get(rewardsAssetId);

if (!rewardingAssetData || !rewardsAssetData) {
return undefined;
return [];
}

const rewardType =
Expand Down Expand Up @@ -118,7 +118,7 @@ function calculateRewardApy(distributionsResp, pool, data, prices) {
const totalSecsInCurrentSeason = (seasonEnd - seasonStart) / 1000;

if (totalSecsInCurrentSeason <= 0) {
return undefined;
return [];
}

const baseApy = calcApy(
Expand Down Expand Up @@ -167,7 +167,7 @@ function calculateRewardApy(distributionsResp, pool, data, prices) {
return seasonsApy.flat();
} catch (error) {
console.error(error);
return undefined;
return [];
}
}

Expand Down

0 comments on commit ce2df84

Please sign in to comment.