Skip to content

Commit

Permalink
fix: making sure BAL is always lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
gmbronco committed Aug 31, 2023
1 parent bc62918 commit 50e7cc1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/pool/lib/apr-data-sources/ve-bal-gauge-apr.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ export class GaugeAprService implements PoolAprService {
const rewardTokenValuePerYear = tokenPrice * rewardTokenPerYear;
let rewardApr = gaugeTvl > 0 ? rewardTokenValuePerYear / gaugeTvl : 0;

const isThirdPartyApr = !this.primaryTokens.includes(tokenAddress);
const isThirdPartyApr = !this.primaryTokens.includes(tokenAddress.toLowerCase());
if (isThirdPartyApr) {
thirdPartyApr += rewardApr;
}

// apply vebal boost for BAL rewards on v2 gauges
if (
rewardToken.tokenAddress === networkContext.data.bal!.address &&
rewardToken.tokenAddress.toLowerCase() === networkContext.data.bal!.address.toLowerCase() &&
preferredStaking.gauge.version === 2
) {
const aprItemId = `${pool.id}-${rewardTokenDefinition.symbol}-apr`;
Expand Down

0 comments on commit 50e7cc1

Please sign in to comment.