diff --git a/src/apps/aurigami/aurigami.definition.ts b/src/apps/aurigami/aurigami.definition.ts index 1a3d18aab..140f6dbe3 100644 --- a/src/apps/aurigami/aurigami.definition.ts +++ b/src/apps/aurigami/aurigami.definition.ts @@ -12,21 +12,45 @@ export const AURIGAMI_DEFINITION = appDefinition({ supply: { id: 'supply', type: GroupType.TOKEN, - label: 'Supply', + label: 'Lending', + groupLabel: 'Supply', }, borrow: { id: 'borrow', type: GroupType.POSITION, - label: 'Borrow', + label: 'Lending', + groupLabel: 'Borrow', }, claimable: { id: 'claimable', type: GroupType.POSITION, label: 'Claimable', + isHiddenFromExplore: true, }, }, + presentationConfig: { + tabs: [ + { + label: 'Lending', + viewType: 'split', + views: [ + { + viewType: 'list', + label: 'Supply', + groupIds: ['supply'], + }, + { + viewType: 'list', + label: 'Borrow', + groupIds: ['borrow'], + }, + ], + }, + ], + }, + tags: [AppTag.LENDING], keywords: [], links: {}, diff --git a/src/apps/aurigami/aurigami.module.ts b/src/apps/aurigami/aurigami.module.ts index 129574e5b..db08c27dd 100644 --- a/src/apps/aurigami/aurigami.module.ts +++ b/src/apps/aurigami/aurigami.module.ts @@ -6,7 +6,6 @@ import { AurigamiAppDefinition, AURIGAMI_DEFINITION } from './aurigami.definitio import { AuroraAurigamiBalanceFetcher } from './aurora/aurigami.balance-fetcher'; import { AuroraAurigamiBorrowContractPositionFetcher } from './aurora/aurigami.borrow.contract-position-fetcher'; import { AuroraAurigamiSupplyTokenFetcher } from './aurora/aurigami.supply.token-fetcher'; -import { AuroraAurigamiTvlFetcher } from './aurora/aurigami.tvl-fetcher'; import { AurigamiContractFactory } from './contracts'; import { AurigamiClaimableBalanceHelper } from './helper/aurigami.claimable.balance-helper'; @@ -19,7 +18,6 @@ import { AurigamiClaimableBalanceHelper } from './helper/aurigami.claimable.bala AuroraAurigamiBalanceFetcher, AuroraAurigamiBorrowContractPositionFetcher, AuroraAurigamiSupplyTokenFetcher, - AuroraAurigamiTvlFetcher, // Helpers AurigamiClaimableBalanceHelper, diff --git a/src/apps/aurigami/aurora/aurigami.borrow.contract-position-fetcher.ts b/src/apps/aurigami/aurora/aurigami.borrow.contract-position-fetcher.ts index 1d3f385df..6cde46dfb 100644 --- a/src/apps/aurigami/aurora/aurigami.borrow.contract-position-fetcher.ts +++ b/src/apps/aurigami/aurora/aurigami.borrow.contract-position-fetcher.ts @@ -12,7 +12,7 @@ const appId = AURIGAMI_DEFINITION.id; const groupId = AURIGAMI_DEFINITION.groups.borrow.id; const network = Network.AURORA_MAINNET; -@Register.ContractPositionFetcher({ appId, groupId, network }) +@Register.ContractPositionFetcher({ appId, groupId, network, options: { includeInTvl: true } }) export class AuroraAurigamiBorrowContractPositionFetcher implements PositionFetcher { constructor( @Inject(CompoundBorrowContractPositionHelper) diff --git a/src/apps/aurigami/aurora/aurigami.supply.token-fetcher.ts b/src/apps/aurigami/aurora/aurigami.supply.token-fetcher.ts index efa68cc1e..ad5e1ba02 100644 --- a/src/apps/aurigami/aurora/aurigami.supply.token-fetcher.ts +++ b/src/apps/aurigami/aurora/aurigami.supply.token-fetcher.ts @@ -14,7 +14,7 @@ const appId = AURIGAMI_DEFINITION.id; const groupId = AURIGAMI_DEFINITION.groups.supply.id; const network = Network.AURORA_MAINNET; -@Register.TokenPositionFetcher({ appId, groupId, network }) +@Register.TokenPositionFetcher({ appId, groupId, network, options: { includeInTvl: true } }) export class AuroraAurigamiSupplyTokenFetcher implements PositionFetcher { constructor( @Inject(APP_TOOLKIT) private readonly appToolkit: IAppToolkit, diff --git a/src/apps/aurigami/aurora/aurigami.tvl-fetcher.ts b/src/apps/aurigami/aurora/aurigami.tvl-fetcher.ts deleted file mode 100644 index a7a6359fc..000000000 --- a/src/apps/aurigami/aurora/aurigami.tvl-fetcher.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Inject } from '@nestjs/common'; -import { sumBy } from 'lodash'; - -import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; -import { Register } from '~app-toolkit/decorators'; -import { CompoundSupplyTokenDataProps } from '~apps/compound/helper/compound.supply.token-helper'; -import { TvlFetcher } from '~stats/tvl/tvl-fetcher.interface'; -import { Network } from '~types/network.interface'; - -import { AURIGAMI_DEFINITION } from '../aurigami.definition'; - -const appId = AURIGAMI_DEFINITION.id; -const network = Network.AURORA_MAINNET; - -@Register.TvlFetcher({ appId, network }) -export class AuroraAurigamiTvlFetcher implements TvlFetcher { - constructor(@Inject(APP_TOOLKIT) private readonly appToolkit: IAppToolkit) {} - - async getTvl() { - const markets = await this.appToolkit.getAppTokenPositions({ - appId, - groupIds: [AURIGAMI_DEFINITION.groups.supply.id], - network, - }); - - return sumBy(markets, b => b.dataProps.liquidity); - } -}