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

fix(rari-fuse): Remove market in label, add Aave V2 as a dependency #916

Merged
merged 1 commit into from
Jul 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { Inject } from '@nestjs/common';

import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface';
import { Register } from '~app-toolkit/decorators';
import { getLabelFromToken } from '~app-toolkit/helpers/presentation/image.present';
import { AAVE_V2_DEFINITION } from '~apps/aave-v2';
import { ARRAKIS_DEFINITION } from '~apps/arrakis/arrakis.definition';
import { CompoundContractFactory } from '~apps/compound';
import { CompoundSupplyTokenHelper } from '~apps/compound/helper/compound.supply.token-helper';
Expand Down Expand Up @@ -37,6 +39,7 @@ export class EthereumRariFuseSupplyTokenFetcher implements PositionFetcher<AppTo
const baseTokens = await this.appToolkit.getBaseTokenPrices(network);
const appTokens = await this.appToolkit.getAppTokenPositions(
{ appId: CURVE_DEFINITION.id, groupIds: [CURVE_DEFINITION.groups.pool.id], network },
{ appId: AAVE_V2_DEFINITION.id, groupIds: [AAVE_V2_DEFINITION.groups.supply.id], network },
{
appId: YEARN_DEFINITION.id,
groupIds: [YEARN_DEFINITION.groups.v1Vault.id, YEARN_DEFINITION.groups.v2Vault.id],
Expand Down Expand Up @@ -72,7 +75,7 @@ export class EthereumRariFuseSupplyTokenFetcher implements PositionFetcher<AppTo
getUnderlyingAddress: ({ contract, multicall }) => multicall.wrap(contract).underlying(),
getExchangeRateMantissa: ({ underlyingTokenDecimals, tokenDecimals }) =>
18 + underlyingTokenDecimals - tokenDecimals,
getDisplayLabel: async ({ underlyingToken }) => `${underlyingToken.symbol} in ${pool.name}`,
getDisplayLabel: async ({ underlyingToken }) => getLabelFromToken(underlyingToken),
});
}),
);
Expand Down