diff --git a/typescript/sdk/src/aws/validator.ts b/typescript/sdk/src/aws/validator.ts index 1a12b8eec5..dc28c1217c 100644 --- a/typescript/sdk/src/aws/validator.ts +++ b/typescript/sdk/src/aws/validator.ts @@ -90,8 +90,11 @@ export class S3Validator extends BaseValidator { async findCheckpoint(messageId: string, limit = 50) { const latestCheckpointIndex = await this.getLatestCheckpointIndex(); // TODO: parallelize? - for (let i = 0; i <= limit; i--) { - const index = latestCheckpointIndex - i; + for ( + let index = latestCheckpointIndex; + index >= latestCheckpointIndex - limit; + index-- + ) { const s3checkpoint = await this.getCheckpoint(index); if (s3checkpoint?.value.message_id === messageId) { return s3checkpoint; diff --git a/typescript/sdk/src/core/HyperlaneCore.ts b/typescript/sdk/src/core/HyperlaneCore.ts index 7e10e6f837..a5739880fd 100644 --- a/typescript/sdk/src/core/HyperlaneCore.ts +++ b/typescript/sdk/src/core/HyperlaneCore.ts @@ -162,8 +162,7 @@ export class HyperlaneCore extends HyperlaneApp { } async relay(filters: ChainMap>) { - for (const chain in filters) { - const filter = filters[chain]; + for (const [chain, filter] of Object.entries(filters)) { const mailbox = this.getContracts(chain).mailbox; mailbox.on( mailbox.filters.Dispatch(...filter), diff --git a/typescript/sdk/src/ism/metadata/builder.ts b/typescript/sdk/src/ism/metadata/builder.ts index 5da29a5ddf..31fd4e08a4 100644 --- a/typescript/sdk/src/ism/metadata/builder.ts +++ b/typescript/sdk/src/ism/metadata/builder.ts @@ -43,6 +43,7 @@ export class BaseMetadataBuilder } } + /* eslint-disable no-case-declarations */ switch (ismConfig.type) { case IsmType.TRUSTED_RELAYER: case IsmType.PAUSABLE: @@ -69,5 +70,6 @@ export class BaseMetadataBuilder default: throw new Error(`Unknown ISM config: ${ismConfig}`); } + /* eslint-enable no-case-declarations */ } } diff --git a/typescript/sdk/src/ism/metadata/multisig.ts b/typescript/sdk/src/ism/metadata/multisig.ts index 1790e425af..6b189edf7e 100644 --- a/typescript/sdk/src/ism/metadata/multisig.ts +++ b/typescript/sdk/src/ism/metadata/multisig.ts @@ -136,7 +136,7 @@ export class MultisigMetadataBuilder index: parseInt(metadata.slice(64, 68)), }; - let signatures: SignatureLike[] = []; + const signatures: SignatureLike[] = []; for (let i = 0; this.hasSignature(metadata, i); i++) { signatures.push(this.signatureAt(metadata, i)); }