Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
Fix leading 0 bug in BlockchainStatus.
Browse files Browse the repository at this point in the history
  • Loading branch information
sproxet committed Jan 17, 2024
1 parent 57b21a3 commit 7f56b40
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/renderer/components/Sidebar/BlockchainStatus.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,12 @@ export default {
currentBlockHeight() {
const segments = [];
let x = this.currentBlockHeight_;
while (x > 0) {
while (x > 1000) {
segments.push((1000 + x % 1000).toString().slice(1));
x = Math.floor(x / 1000);
}
if (x)
segments.push(x.toString());
return segments.reverse().join(',');
},
Expand Down

0 comments on commit 7f56b40

Please sign in to comment.