Skip to content

Commit

Permalink
Merge branch '41-scanner-sync-warn' into 'dev'
Browse files Browse the repository at this point in the history
Fix warn notification to show correct time

Closes #41

See merge request ergo/rosen-bridge/health-check!38
  • Loading branch information
zargarzadehm committed Dec 18, 2024
2 parents 8a3470f + 9616cf3 commit 844aa41
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/sour-falcons-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rosen-bridge/node-sync-check': patch
---

Fix warn notification to show correct time
6 changes: 3 additions & 3 deletions packages/node-sync-check/lib/ergoNodeSync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ class ErgoNodeSyncHealthCheckParam extends AbstractHealthCheckParam {
if (this.nodeLastBlockTime > this.maxBlockTime) {
let time;
if (this.nodeLastBlockTime >= 60) {
time = `${Math.floor(this.nodeLastBlockTime / 60)} hour and ${
this.nodeLastBlockTime % 60
} minutes`;
time = `${Math.floor(this.nodeLastBlockTime / 60)} hour and ${Math.floor(
this.nodeLastBlockTime % 60,
)} minutes`;
} else time = `${Math.floor(this.nodeLastBlockTime)} minutes`;
notification = notification + `The last block is scanned ${time} ago.\n`;
}
Expand Down

0 comments on commit 844aa41

Please sign in to comment.