mirror of
https://github.com/pezkuwichain/pezkuwi-wallet-android.git
synced 2026-04-21 23:48:00 +00:00
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:
+3
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user