Skip to content

Commit 239bfab

Browse files
committed
fix(banner): get network from accounts to include greenlight account
1 parent d710d17 commit 239bfab

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

common/src/commonMain/kotlin/com/blockstream/domain/banner/GetBannerUseCase.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@ class GetBannerUseCase() {
1616
// Filter closed banners
1717
excludedBanners.contains(it)
1818
}?.filterNot {
19-
// Filter networks
20-
(!it.hasNetworks || ((it.networks ?: listOf()).intersect((sessionOrNull?.activeSessions?.map { it.network }
21-
?: setOf()).toSet()).isNotEmpty()))
19+
// Filter networks (get networks from all accounts to also match greenlight)
20+
(!it.hasNetworks || ((it.networks ?: listOf()).intersect(
21+
sessionOrNull?.allAccounts?.value?.map { it.networkId }?.toSet() ?: emptySet()
22+
).isNotEmpty()))
2223
}?.filterNot {
2324
// Filter based on screen name
2425
(it.screens?.contains(screenName) == true || it.screens?.contains("*") == true)

0 commit comments

Comments
 (0)