Skip to content

Commit

Permalink
Ensure newly registered harvesters with only nodeId stats work
Browse files Browse the repository at this point in the history
  • Loading branch information
felixbrucker committed Oct 28, 2023
1 parent 3355f80 commit 08a9123
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/harvester-card/harvester-card.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ export class HarvesterCardComponent implements OnInit, OnDestroy {
map(satellites => satellites
.filter(satellite => !satellite.hidden)
.map(satellite => satellite.services?.harvester)
.filter(harvester => harvester?.stats !== undefined)
.filter(harvester => harvester?.stats !== undefined && harvester.stats.plotCount !== undefined)
.find(harvester => harvester.stats.nodeId === this.harvester.peerId.ensureHexPrefix())
),
filter(harvester => harvester !== undefined),
Expand Down
2 changes: 1 addition & 1 deletion src/app/my-farmer/my-farmer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ export class MyFarmerComponent implements OnInit, OnDestroy {
map(satellites => satellites
.filter(satellite => !satellite.hidden)
.map(satellite => satellite.services?.harvester)
.filter(harvester => harvester !== undefined && harvester.stats !== undefined && harvester.lastUpdate !== undefined && moment(harvester.lastUpdate).isAfter(moment().subtract(5, 'minutes')))
.filter(harvester => harvester !== undefined && harvester.stats !== undefined && harvester.stats.plotCount !== undefined && harvester.lastUpdate !== undefined && moment(harvester.lastUpdate).isAfter(moment().subtract(5, 'minutes')))
),
shareReplay(),
)
Expand Down

0 comments on commit 08a9123

Please sign in to comment.