From fd53d07116c08dec96a0c1be7713ddf926375975 Mon Sep 17 00:00:00 2001 From: William Poulin Date: Wed, 11 Oct 2023 16:20:30 -0400 Subject: [PATCH] fix(meta-street): Linting --- ...eet.lending-v2-legacy.contract-position-fetcher.ts | 11 +++++------ ...eta-street.lending-v2.contract-position-fetcher.ts | 11 +++++------ src/apps/meta-street/meta-street.module.ts | 2 +- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/src/apps/meta-street/ethereum/meta-street.lending-v2-legacy.contract-position-fetcher.ts b/src/apps/meta-street/ethereum/meta-street.lending-v2-legacy.contract-position-fetcher.ts index 279f40fb0..ea9a3ed35 100644 --- a/src/apps/meta-street/ethereum/meta-street.lending-v2-legacy.contract-position-fetcher.ts +++ b/src/apps/meta-street/ethereum/meta-street.lending-v2-legacy.contract-position-fetcher.ts @@ -5,7 +5,7 @@ import { gql } from 'graphql-request'; import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; import { gqlFetch } from '~app-toolkit/helpers/the-graph.helper'; - +import { MetaType } from '~position/position.interface'; import { ContractPositionTemplatePositionFetcher } from '~position/template/contract-position.template.position-fetcher'; import { GetDefinitionsParams, @@ -15,7 +15,6 @@ import { GetTokenBalancesParams, GetDataPropsParams, } from '~position/template/contract-position.template.types'; -import { MetaType } from '~position/position.interface'; import { MetaStreetContractFactory, PoolV2Legacy } from '../contracts'; @@ -93,17 +92,17 @@ export type Redemption = { @PositionTemplate() export class EthereumMetaStreetLendingV2LegacyContractPositionFetcher extends ContractPositionTemplatePositionFetcher { - groupLabel: string = 'Lending V2 Legacy'; + groupLabel = 'Lending V2 Legacy'; constructor( @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(MetaStreetContractFactory) protected readonly MetaStreetContractFactory: MetaStreetContractFactory, + @Inject(MetaStreetContractFactory) protected readonly contractFactory: MetaStreetContractFactory, ) { super(appToolkit); } getContract(_address: string): PoolV2Legacy { - return this.MetaStreetContractFactory.poolV2Legacy({ address: _address, network: this.network }); + return this.contractFactory.poolV2Legacy({ address: _address, network: this.network }); } async getDefinitions(_params: GetDefinitionsParams): Promise { @@ -192,7 +191,7 @@ export class EthereumMetaStreetLendingV2LegacyContractPositionFetcher extends Co ); /* Get account's withdrawal logs and compute withdrawn amount and burned shares */ - let firstDepositBlockNumber: number = depositLogs.length > 0 ? depositLogs[0].blockNumber : START_BLOCK_NUMBER; + const firstDepositBlockNumber: number = depositLogs.length > 0 ? depositLogs[0].blockNumber : START_BLOCK_NUMBER; const withdrawLogs = await contract.queryFilter(contract.filters.Withdrawn(address, tick), firstDepositBlockNumber); const withdrawn: Withdrawn = withdrawLogs.reduce( (withdrawn: Withdrawn, l) => { diff --git a/src/apps/meta-street/ethereum/meta-street.lending-v2.contract-position-fetcher.ts b/src/apps/meta-street/ethereum/meta-street.lending-v2.contract-position-fetcher.ts index 2aec412d0..721811a95 100644 --- a/src/apps/meta-street/ethereum/meta-street.lending-v2.contract-position-fetcher.ts +++ b/src/apps/meta-street/ethereum/meta-street.lending-v2.contract-position-fetcher.ts @@ -5,7 +5,7 @@ import { gql } from 'graphql-request'; import { APP_TOOLKIT, IAppToolkit } from '~app-toolkit/app-toolkit.interface'; import { PositionTemplate } from '~app-toolkit/decorators/position-template.decorator'; import { gqlFetch } from '~app-toolkit/helpers/the-graph.helper'; - +import { MetaType } from '~position/position.interface'; import { ContractPositionTemplatePositionFetcher } from '~position/template/contract-position.template.position-fetcher'; import { GetDefinitionsParams, @@ -15,7 +15,6 @@ import { GetTokenBalancesParams, GetDataPropsParams, } from '~position/template/contract-position.template.types'; -import { MetaType } from '~position/position.interface'; import { MetaStreetContractFactory, PoolV2 } from '../contracts'; @@ -93,17 +92,17 @@ export type Redemption = { @PositionTemplate() export class EthereumMetaStreetLendingV2ContractPositionFetcher extends ContractPositionTemplatePositionFetcher { - groupLabel: string = 'Lending V2'; + groupLabel = 'Lending V2'; constructor( @Inject(APP_TOOLKIT) protected readonly appToolkit: IAppToolkit, - @Inject(MetaStreetContractFactory) protected readonly MetaStreetContractFactory: MetaStreetContractFactory, + @Inject(MetaStreetContractFactory) protected readonly contractFactory: MetaStreetContractFactory, ) { super(appToolkit); } getContract(_address: string): PoolV2 { - return this.MetaStreetContractFactory.poolV2({ address: _address, network: this.network }); + return this.contractFactory.poolV2({ address: _address, network: this.network }); } async getDefinitions(_params: GetDefinitionsParams): Promise { @@ -191,7 +190,7 @@ export class EthereumMetaStreetLendingV2ContractPositionFetcher extends Contract ); /* Get account's withdrawal logs and compute withdrawn amount and burned shares */ - let firstDepositBlockNumber: number = depositLogs.length > 0 ? depositLogs[0].blockNumber : START_BLOCK_NUMBER; + const firstDepositBlockNumber: number = depositLogs.length > 0 ? depositLogs[0].blockNumber : START_BLOCK_NUMBER; const withdrawLogs = await contract.queryFilter(contract.filters.Withdrawn(address, tick), firstDepositBlockNumber); const withdrawn: Withdrawn = withdrawLogs.reduce( (withdrawn: Withdrawn, l) => { diff --git a/src/apps/meta-street/meta-street.module.ts b/src/apps/meta-street/meta-street.module.ts index 86ed61fb4..f99996dc8 100644 --- a/src/apps/meta-street/meta-street.module.ts +++ b/src/apps/meta-street/meta-street.module.ts @@ -3,8 +3,8 @@ import { Module } from '@nestjs/common'; import { AbstractApp } from '~app/app.dynamic-module'; import { MetaStreetContractFactory } from './contracts'; -import { EthereumMetaStreetLendingV2ContractPositionFetcher } from './ethereum/meta-street.lending-v2.contract-position-fetcher'; import { EthereumMetaStreetLendingV2LegacyContractPositionFetcher } from './ethereum/meta-street.lending-v2-legacy.contract-position-fetcher'; +import { EthereumMetaStreetLendingV2ContractPositionFetcher } from './ethereum/meta-street.lending-v2.contract-position-fetcher'; @Module({ providers: [