Skip to content

Commit

Permalink
bug fix: baker rewards: don't return last cycle if we don't have the …
Browse files Browse the repository at this point in the history
…info
  • Loading branch information
simonmcl committed Mar 31, 2024
1 parent 09ac95c commit b628734
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/KukaiCoreSwift/Clients/TzKTClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -584,8 +584,8 @@ public class TzKTClient {
}

if let last = cycles.last, last.firstLevel > level {
// Level is in the past, return last cycle we have
return last
// Level is in the past, return nil so we don't display invalid data
return nil

} else if let first = cycles.first, first.lastLevel < level {
// Delegation level is in the future, return nil
Expand Down

0 comments on commit b628734

Please sign in to comment.