Skip to content

Commit

Permalink
fix: log account value
Browse files Browse the repository at this point in the history
  • Loading branch information
jkbpvsc committed Nov 9, 2023
1 parent 55987b2 commit 266cc20
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/alpha-liquidator/src/liquidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ class Liquidator {
}
}, 10 * 60 * 1000); // refresh cache every 10 minutes

setInterval(this.printAccountValue, 30 * 1000);
setInterval(() => this.printAccountValue(), 30 * 1000);

this.printAccountValue();

console.log("Liquidating on %s banks", this.client.banks.size);
Expand All @@ -84,11 +85,10 @@ class Liquidator {
const accountValue = assets.minus(liabilities);
console.log("Account Value: $%s", accountValue);
} catch (e) {
console.error("Failed to fetch account value");
console.error("Failed to fetch account value %s", e);
}
}


private async reload() {
await this.client.reload();
await this.account.reload();
Expand Down

0 comments on commit 266cc20

Please sign in to comment.