Skip to content

Commit

Permalink
better health readability
Browse files Browse the repository at this point in the history
  • Loading branch information
mrq1911 committed Dec 17, 2024
1 parent f614811 commit 6354afb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/borrowers.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export default class Borrowers {
try {
const data = await getUserAccountData(contract, address);
if (data.healthFactor < liquidationAlert) {
const health = `:${data.healthFactor < 1 ? 'broken_heart' : 'heart'}:**${Math.floor(data.healthFactor * 100) / 100}**`;
const health = `:${data.healthFactor < 1 ? 'broken_heart' : 'heart'}:**${(Math.floor(data.healthFactor * 100) / 100).toFixed(2)}**`;
broadcastOnce(`:rotating_light: liquidation imminent for ${formatAccount(data.account)} position ${health} with **${formatUsdNumber(data.totalCollateralBase)}** collateral at risk `);
}
this.health[contract].set(address, data);
Expand Down

0 comments on commit 6354afb

Please sign in to comment.