Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
pxrl committed Jan 3, 2024
1 parent a524107 commit 3bd3f0b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/utils/DepositUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ export enum InvalidFill {
DepositIdInvalid = 0, // Deposit ID seems invalid for origin SpokePool
DepositIdNotFound, // Deposit ID not found (bad RPC data?)
FillMismatch, // Fill does not match deposit parameters for deposit ID.
};
}

export type DepositSearchResult =
| { found: true; deposit: DepositWithBlock; }
| { found: false; code: InvalidFill; reason: string; };
| { found: true; deposit: DepositWithBlock }
| { found: false; code: InvalidFill; reason: string };

/**
* Attempts to resolve a deposit for a fill. If the fill's deposit Id is within the spoke pool client's search range,
Expand Down Expand Up @@ -52,7 +52,7 @@ export async function queryHistoricalDepositForFill(

const { depositId } = fill;
let { firstDepositIdForSpokePool: lowId, lastDepositIdForSpokePool: highId } = spokePoolClient;
if (depositId < lowId || depositId > highId) {
if (depositId < lowId || depositId > highId) {
return {
found: false,
code: InvalidFill.DepositIdInvalid,
Expand All @@ -70,7 +70,7 @@ export async function queryHistoricalDepositForFill(
return {
found: false,
code: isDefined(deposit) ? InvalidFill.FillMismatch : InvalidFill.DepositIdNotFound,
reason: `Deposit ID ${depositId} not found in SpokePoolClient event buffer.`
reason: `Deposit ID ${depositId} not found in SpokePoolClient event buffer.`,
};
}

Expand Down
2 changes: 1 addition & 1 deletion test/SpokePoolClient.ValidateFill.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
InvalidFill,
relayFilledAmount,
validateFillForDeposit,
queryHistoricalDepositForFill
queryHistoricalDepositForFill,
} from "../src/utils";
import {
expect,
Expand Down

0 comments on commit 3bd3f0b

Please sign in to comment.