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

fix(meta-street): Linting #2967

Merged
merged 2 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
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 @@ -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,
Expand All @@ -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';

Expand Down Expand Up @@ -93,17 +92,17 @@ export type Redemption = {

@PositionTemplate()
export class EthereumMetaStreetLendingV2LegacyContractPositionFetcher extends ContractPositionTemplatePositionFetcher<PoolV2Legacy> {
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<ContractPositionDefinition[]> {
Expand Down Expand Up @@ -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) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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';

Expand Down Expand Up @@ -93,17 +92,17 @@ export type Redemption = {

@PositionTemplate()
export class EthereumMetaStreetLendingV2ContractPositionFetcher extends ContractPositionTemplatePositionFetcher<PoolV2> {
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<ContractPositionDefinition[]> {
Expand Down Expand Up @@ -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) => {
Expand Down
2 changes: 1 addition & 1 deletion src/apps/meta-street/meta-street.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
Loading