Skip to content

Commit

Permalink
Fix missing partial stats checks for wallets
Browse files Browse the repository at this point in the history
  • Loading branch information
felixbrucker committed Apr 26, 2023
1 parent 272dd7a commit a5f9076
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
1.17.1 / 2023-04-26
==================

* Fix wallet stat collection errors.

1.17.0 / 2023-04-26
==================

Expand Down
9 changes: 9 additions & 0 deletions lib/service/stats-collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,18 +478,27 @@ class StatsCollection {
if (walletPartialStats === undefined) {
walletPartialStats = {}
}
if (walletPartialStats.syncStatus === undefined) {
walletPartialStats.syncStatus = {}
}
walletPartialStats.syncStatus.synced = newSyncStatus.synced
}
if (walletStats.syncStatus.syncing !== newSyncStatus.syncing) {
if (walletPartialStats === undefined) {
walletPartialStats = {}
}
if (walletPartialStats.syncStatus === undefined) {
walletPartialStats.syncStatus = {}
}
walletPartialStats.syncStatus.syncing = newSyncStatus.syncing
}
if (walletStats.syncStatus.syncedHeight !== newSyncStatus.syncedHeight) {
if (walletPartialStats === undefined) {
walletPartialStats = {}
}
if (walletPartialStats.syncStatus === undefined) {
walletPartialStats.syncStatus = {}
}
walletPartialStats.syncStatus.syncedHeight = newSyncStatus.syncedHeight
}
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chia-dashboard-satellite",
"version": "1.17.0",
"version": "1.17.1",
"repository": "https://github.com/felixbrucker/chia-dashboard-satellite.git",
"bugs": "https://github.com/felixbrucker/chia-dashboard-satellite/issues",
"license": "GPL-3.0",
Expand Down

0 comments on commit a5f9076

Please sign in to comment.