Skip to content

Commit

Permalink
fix: sort accounts by hf ascending
Browse files Browse the repository at this point in the history
  • Loading branch information
doomsower committed Apr 24, 2024
1 parent 2a0214a commit 806c2c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/services/scan/ScanServiceV3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,9 @@ export class ScanServiceV3 extends AbstractScanService {
redstoneUpdates,
atBlock,
);
accounts = accounts.sort((a, b) => a.healthFactor - b.healthFactor);
this.log.debug(
`${accounts.length} v3 accounts to liquidate${blockS}: ${accounts.map(a => a.addr).join(",")}`,
`${accounts.length} v3 accounts to liquidate${blockS}: ${accounts.map(a => `${a.addr} [${a.healthFactor}]`).join(",")}`,
);
const redstoneTokens = redstoneUpdates.map(({ token }) => token);
const redstoneSymbols = redstoneTokens.map(
Expand Down

0 comments on commit 806c2c7

Please sign in to comment.