Skip to content

Commit

Permalink
common: remove unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
tilacog committed Sep 18, 2023
1 parent da3a7ca commit d81e489
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import {
BigNumberish,
ContractReceipt,
PopulatedTransaction,
providers,
utils,
} from 'ethers'

Expand Down Expand Up @@ -251,7 +250,6 @@ export class AllocationManager {
new SubgraphDeploymentID(action.deploymentID!),
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
parseGRT(action.amount!),
undefined,
)
case ActionType.UNALLOCATE:
return await this.prepareUnallocate(
Expand Down Expand Up @@ -291,7 +289,6 @@ export class AllocationManager {
logger: Logger,
deployment: SubgraphDeploymentID,
amount: BigNumber,
indexNode: string | undefined,
): Promise<AllocateTransactionParams> {
logger.info('Preparing to allocate', {
deployment: deployment.ipfsHash,
Expand Down Expand Up @@ -465,9 +462,8 @@ export class AllocationManager {
logger: Logger,
deployment: SubgraphDeploymentID,
amount: BigNumber,
indexNode: string | undefined,
): Promise<PopulatedTransaction> {
const params = await this.prepareAllocateParams(logger, deployment, amount, indexNode)
const params = await this.prepareAllocateParams(logger, deployment, amount)
logger.debug(`Populating allocateFrom transaction`, {
indexer: params.indexer,
subgraphDeployment: params.subgraphDeploymentID,
Expand Down
2 changes: 1 addition & 1 deletion packages/indexer-common/src/indexer-management/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ export class IndexerManagementClient extends Client {
export const createIndexerManagementClient = async (
options: IndexerManagementClientOptions,
): Promise<IndexerManagementClient> => {
const { models, graphNode, indexNodeIDs, logger, defaults, multiNetworks } = options
const { models, graphNode, logger, defaults, multiNetworks } = options
const schema = buildSchema(print(SCHEMA_SDL))
const resolvers = {
...indexingRuleResolvers,
Expand Down
2 changes: 2 additions & 0 deletions packages/indexer-common/src/indexer-management/monitor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,9 @@ export class NetworkMonitor {

// Flatten multiple subgraphDeployment versions into a single `TransferredSubgraphDeployment` object
// TODO: We could use `zod` to parse GraphQL responses into the expected type
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return transferredDeployments.flatMap((deployment: any) => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return deployment.versions.map((version: any) => {
return {
id: deployment.id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -446,12 +446,10 @@ export default {
{
deployment,
amount,
indexNode,
protocolNetwork,
}: {
deployment: string
amount: string
indexNode: string | undefined
protocolNetwork: string
},
{ multiNetworks, graphNode, logger, models }: IndexerManagementResolverContext,
Expand Down
1 change: 0 additions & 1 deletion packages/indexer-common/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
} from '@ethersproject/providers'
import { Logger, Metrics, timer } from '@graphprotocol/common-ts'
import { indexerError, IndexerErrorCode } from './errors'
import { Sequelize } from 'sequelize'

export const parseBoolean = (
val: string | boolean | number | undefined | null,
Expand Down

0 comments on commit d81e489

Please sign in to comment.