Skip to content

Commit

Permalink
fix error reason
Browse files Browse the repository at this point in the history
  • Loading branch information
pxrl committed Jan 12, 2024
1 parent dcf12b8 commit 43eea03
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/utils/DepositUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export async function queryHistoricalDepositForFill(

({ earliestDepositIdQueried: lowId, latestDepositIdQueried: highId } = spokePoolClient);
if (depositId >= lowId && depositId <= highId) {
const originChain = getNetworkName(fill.originChainId);
const deposit = spokePoolClient.getDeposit(depositId);
if (isDefined(deposit)) {
const match = validateFillForDeposit(fill, deposit);
Expand All @@ -72,14 +73,14 @@ export async function queryHistoricalDepositForFill(
return {
found: false,
code: InvalidFill.FillMismatch,
reason: `Fill for deposit ID ${depositId} buffer is invalid (${match.reason}).`,
reason: `Fill for ${originChain} deposit ID ${depositId} is invalid (${match.reason}).`,
};
}

return {
found: false,
code: InvalidFill.DepositIdNotFound,
reason: `Deposit ID ${depositId} not found in SpokePoolClient event buffer.`,
reason: `${originChain} deposit ID ${depositId} not found in SpokePoolClient event buffer.`,
};
}

Expand Down

0 comments on commit 43eea03

Please sign in to comment.