Skip to content

Commit

Permalink
log
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhochu committed Dec 29, 2023
1 parent 70dc4b4 commit 33a1a81
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions redux/selectors/getAccountRewards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ export const computeNetLiquidityDailyAmount = (
const newBoostedShares = shares * multiplier;
const newTotalBoostedShares = totalBoostedShares + newBoostedShares - boostedShares;
const newDailyAmount = (newBoostedShares / newTotalBoostedShares) * totalRewardsPerDay;

console.info(
` | dailyAmount:${dailyAmount} boostedShares:${boostedShares}/totalBoostedShares:${totalBoostedShares}*totalRewardsPerDay:${totalRewardsPerDay}`,
);
return { dailyAmount, newDailyAmount, multiplier, totalBoostedShares, shares };
};

Expand Down Expand Up @@ -232,6 +234,7 @@ export const getAccountRewards = createSelector(
const { icon, symbol, name } = rewardAsset.metadata;
const unclaimedAmount = Number(shrinkToken(farmData.unclaimed_amount, rewardAssetDecimals));

console.info(`rewardTokenId:${rewardTokenId}`);
const { dailyAmount, newDailyAmount, multiplier } = computeNetLiquidityDailyAmount(
rewardAsset,
xBRRRAmount,
Expand Down Expand Up @@ -259,8 +262,9 @@ export const getAccountRewards = createSelector(
const hasNetTvlFarm = !!Object.entries(assets.netTvlFarm).length;

const suppliedRewards = Object.entries(supplied).map(computePoolsRewards("supplied")).flat();
console.info("suppliedRewards", suppliedRewards);
const borrowedRewards = Object.entries(borrowed).map(computePoolsRewards("borrowed")).flat();

console.info("borrowedRewards", borrowedRewards);
const netLiquidityRewards = hasNetTvlFarm
? Object.entries(netTvl)
.filter(([tokenId]) => assets.netTvlFarm[tokenId])
Expand Down

0 comments on commit 33a1a81

Please sign in to comment.