Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
yorhodes committed May 2, 2024
1 parent ea8dd8b commit d5f140e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
7 changes: 5 additions & 2 deletions typescript/sdk/src/aws/validator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 1 addition & 2 deletions typescript/sdk/src/core/HyperlaneCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,7 @@ export class HyperlaneCore extends HyperlaneApp<CoreFactories> {
}

async relay(filters: ChainMap<Parameters<Mailbox['filters']['Dispatch']>>) {
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<DispatchEvent>(
mailbox.filters.Dispatch(...filter),
Expand Down
2 changes: 2 additions & 0 deletions typescript/sdk/src/ism/metadata/builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export class BaseMetadataBuilder
}
}

/* eslint-disable no-case-declarations */
switch (ismConfig.type) {
case IsmType.TRUSTED_RELAYER:
case IsmType.PAUSABLE:
Expand All @@ -69,5 +70,6 @@ export class BaseMetadataBuilder
default:
throw new Error(`Unknown ISM config: ${ismConfig}`);
}
/* eslint-enable no-case-declarations */
}
}
2 changes: 1 addition & 1 deletion typescript/sdk/src/ism/metadata/multisig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit d5f140e

Please sign in to comment.