fix: save exposure flag for uncertain state to prevent setup screen hang

When neither paged nor legacy exposures exist for the current era,
ValidatorExposureUpdater returned early without saving the
PagedExposuresUsed flag. This caused storageCache.getEntry() to
suspend indefinitely, blocking the staking setup screen.

Save the flag as false for UNCERTAIN state so downstream code
can proceed with empty exposure data instead of hanging.
This commit is contained in:
2026-02-27 04:30:53 +03:00
parent 40f1b9bcaa
commit 2d0d46688e
@@ -208,7 +208,9 @@ class ValidatorExposureUpdater(
val isUsed = when (state) {
ExposureState.CERTAIN_PAGED -> true
ExposureState.CERTAIN_LEGACY -> false
ExposureState.UNCERTAIN -> return
// When no exposures found for the current era (neither paged nor legacy),
// still save a default flag to prevent storageCache.getEntry() from suspending forever
ExposureState.UNCERTAIN -> false
}
val encodedValue = isPagedExposuresValue(isUsed)