Skip to content

Commit 0db92e4

Browse files
committed
fix: log non-liquidatable cas
1 parent 1ef2911 commit 0db92e4

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/services/scanner/Scanner.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -398,9 +398,19 @@ export class Scanner {
398398
],
399399
});
400400
mc = mc.slice(priceUpdates.length);
401-
const result = accs.filter(
402-
(_, i) => mc[i].status === "success" && mc[i].result,
403-
);
401+
const result: CreditAccountDataRaw[] = [];
402+
for (let i = 0; i < accs.length; i++) {
403+
const isLiquidatable = mc[i].status === "success" && mc[i].result;
404+
const account = accs[i];
405+
if (isLiquidatable) {
406+
result.push(account);
407+
} else {
408+
this.log.debug(
409+
{ response: mc[i] },
410+
`account ${account.addr} with hf ${account.healthFactor} is not liquidatable`,
411+
);
412+
}
413+
}
404414
this.log.debug(`${result.length}/${accs.length} accounts are liquidatable`);
405415
return result;
406416
}

0 commit comments

Comments
 (0)