From 1af023431c1f253955c61687280cb22293f08100 Mon Sep 17 00:00:00 2001 From: antonijzelinskij Date: Tue, 16 Jul 2024 14:38:41 +0200 Subject: [PATCH 1/2] Update GovernancePushSettingsInteractor.kt --- .../domain/interactor/GovernancePushSettingsInteractor.kt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/feature-push-notifications/src/main/java/io/novafoundation/nova/feature_push_notifications/domain/interactor/GovernancePushSettingsInteractor.kt b/feature-push-notifications/src/main/java/io/novafoundation/nova/feature_push_notifications/domain/interactor/GovernancePushSettingsInteractor.kt index be06dfc118..dfc2e811d2 100644 --- a/feature-push-notifications/src/main/java/io/novafoundation/nova/feature_push_notifications/domain/interactor/GovernancePushSettingsInteractor.kt +++ b/feature-push-notifications/src/main/java/io/novafoundation/nova/feature_push_notifications/domain/interactor/GovernancePushSettingsInteractor.kt @@ -7,6 +7,8 @@ import io.novafoundation.nova.runtime.ext.defaultComparatorFrom import io.novafoundation.nova.runtime.ext.openGovIfSupported import io.novafoundation.nova.runtime.multiNetwork.ChainRegistry import io.novafoundation.nova.runtime.multiNetwork.chain.model.Chain +import io.novafoundation.nova.runtime.multiNetwork.enabledChains +import io.novafoundation.nova.runtime.multiNetwork.enabledChainsFlow import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.map @@ -27,9 +29,9 @@ class RealGovernancePushSettingsInteractor( ) : GovernancePushSettingsInteractor { override fun governanceChainsFlow(): Flow> { - return chainRegistry.currentChains - .map { - it.filter { it.pushSupport } + return chainRegistry.enabledChainsFlow() + .map { chains -> + chains.filter { it.pushSupport } .flatMap { it.supportedGovTypes() } .map { (chain, govType) -> ChainWithGovTracks(chain, govType, getTrackIds(chain, govType)) } .sortedWith(Chain.defaultComparatorFrom(ChainWithGovTracks::chain)) From 9011086e3e4faae35fe194dd34fc44a4579d40bc Mon Sep 17 00:00:00 2001 From: antonijzelinskij Date: Tue, 16 Jul 2024 14:44:18 +0200 Subject: [PATCH 2/2] Update GovernancePushSettingsInteractor.kt --- .../domain/interactor/GovernancePushSettingsInteractor.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/feature-push-notifications/src/main/java/io/novafoundation/nova/feature_push_notifications/domain/interactor/GovernancePushSettingsInteractor.kt b/feature-push-notifications/src/main/java/io/novafoundation/nova/feature_push_notifications/domain/interactor/GovernancePushSettingsInteractor.kt index dfc2e811d2..c1750f5f8f 100644 --- a/feature-push-notifications/src/main/java/io/novafoundation/nova/feature_push_notifications/domain/interactor/GovernancePushSettingsInteractor.kt +++ b/feature-push-notifications/src/main/java/io/novafoundation/nova/feature_push_notifications/domain/interactor/GovernancePushSettingsInteractor.kt @@ -7,7 +7,6 @@ import io.novafoundation.nova.runtime.ext.defaultComparatorFrom import io.novafoundation.nova.runtime.ext.openGovIfSupported import io.novafoundation.nova.runtime.multiNetwork.ChainRegistry import io.novafoundation.nova.runtime.multiNetwork.chain.model.Chain -import io.novafoundation.nova.runtime.multiNetwork.enabledChains import io.novafoundation.nova.runtime.multiNetwork.enabledChainsFlow import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.map