From 2d0d46688e7efd519d1c6460bed3c83e156baaf3 Mon Sep 17 00:00:00 2001 From: Kurdistan Tech Ministry Date: Fri, 27 Feb 2026 04:30:53 +0300 Subject: [PATCH] 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. --- .../network/blockhain/updaters/ValidatorExposureUpdater.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/feature-staking-impl/src/main/java/io/novafoundation/nova/feature_staking_impl/data/network/blockhain/updaters/ValidatorExposureUpdater.kt b/feature-staking-impl/src/main/java/io/novafoundation/nova/feature_staking_impl/data/network/blockhain/updaters/ValidatorExposureUpdater.kt index 1ce07a1..71dc83e 100644 --- a/feature-staking-impl/src/main/java/io/novafoundation/nova/feature_staking_impl/data/network/blockhain/updaters/ValidatorExposureUpdater.kt +++ b/feature-staking-impl/src/main/java/io/novafoundation/nova/feature_staking_impl/data/network/blockhain/updaters/ValidatorExposureUpdater.kt @@ -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)