Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
fix(agave): Remove claimable reward until Symmetric Exchange is suppo…
Browse files Browse the repository at this point in the history
…rted (#744)
  • Loading branch information
liz-cs authored Jun 23, 2022
1 parent 66dd3ae commit 0de275d
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions src/apps/agave/gnosis/agave.balance-fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Inject } from '@nestjs/common';

import { Register } from '~app-toolkit/decorators';
import { presentBalanceFetcherResponse } from '~app-toolkit/helpers/presentation/balance-fetcher-response.present';
import { AaveV2LendingBalanceHelper, AaveV2ClaimableBalanceHelper, AaveV2HealthFactorMetaHelper } from '~apps/aave-v2';
import { AaveV2LendingBalanceHelper, AaveV2HealthFactorMetaHelper, AaveV2ClaimableBalanceHelper } from '~apps/aave-v2';
import { BalanceFetcher } from '~balance/balance-fetcher.interface';
import { Network } from '~types/network.interface';

Expand Down Expand Up @@ -43,14 +43,14 @@ export class GnosisAgaveBalanceFetcher implements BalanceFetcher {
]).then(v => v.flat());
}

private async getClaimableBalances(address: string) {
return this.aaveV2ClaimableBalanceHelper.getClaimableBalances({
address,
appId: AGAVE_DEFINITION.id,
groupId: AGAVE_DEFINITION.groups.claimable.id,
network,
});
}
// private async getClaimableBalances(address: string) {
// return this.aaveV2ClaimableBalanceHelper.getClaimableBalances({
// address,
// appId: AGAVE_DEFINITION.id,
// groupId: AGAVE_DEFINITION.groups.claimable.id,
// network,
// });
// }

private async getHealthFactorMeta(address: string) {
return this.healthFactorHelper.getHealthFactor({
Expand All @@ -61,9 +61,10 @@ export class GnosisAgaveBalanceFetcher implements BalanceFetcher {
}

async getBalances(address: string) {
const [lendingBalances, claimable, healthFactorMeta] = await Promise.all([
//const [lendingBalances, claimable, healthFactorMeta] = await Promise.all([
const [lendingBalances, healthFactorMeta] = await Promise.all([
this.getLendingBalances(address),
this.getClaimableBalances(address),
//this.getClaimableBalances(address),
this.getHealthFactorMeta(address),
]);

Expand All @@ -73,10 +74,10 @@ export class GnosisAgaveBalanceFetcher implements BalanceFetcher {
assets: lendingBalances,
meta: lendingBalances.find(v => v.balanceUSD < 0) ? [healthFactorMeta] : [],
},
{
label: 'Reward',
assets: claimable,
},
// {
// label: 'Reward',
// assets: claimable,
// },
]);
}
}

0 comments on commit 0de275d

Please sign in to comment.