File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments