Skip to content

Commit

Permalink
fix(relayer): Don't complete slow fill-only fills (#796)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaspai committed Jul 9, 2023
1 parent 0275db8 commit 9e5f186
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions src/relayer/Relayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,18 +204,17 @@ export class Relayer {
}

// If depositor is on the slow deposit list, then send a zero fill to initiate a slow relay and return early.
if (
sendSlowRelays &&
fillCount === 0 &&
slowDepositors?.includes(deposit.depositor) &&
tokenClient.hasBalanceForZeroFill(deposit)
) {
this.logger.debug({
at: "Relayer",
message: "Initiating slow fill for grey listed depositor",
depositor: deposit.depositor,
});
this.zeroFillDeposit(deposit);
if (slowDepositors?.includes(deposit.depositor)) {
if (sendSlowRelays && fillCount === 0 && tokenClient.hasBalanceForZeroFill(deposit)) {
this.logger.debug({
at: "Relayer",
message: "Initiating slow fill for grey listed depositor",
depositor: deposit.depositor,
});
this.zeroFillDeposit(deposit);
}
// Regardless of whether we should send a slow fill or not for this depositor, exit early at this point
// so we don't fast fill an already slow filled deposit from the slow fill-only list.
continue;
}

Expand Down

0 comments on commit 9e5f186

Please sign in to comment.