Skip to content

Commit

Permalink
Merge pull request #939 from radixdlt/fix/accounts-loading
Browse files Browse the repository at this point in the history
Fix accounts loading in wallet screen
  • Loading branch information
sergiupuhalschi-rdx authored May 27, 2024
2 parents 1ad0baa + 8dad856 commit c8abf22
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import kotlinx.coroutines.flow.flowOn
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.mapLatest
import kotlinx.coroutines.flow.onStart
import kotlinx.coroutines.flow.update
import kotlinx.coroutines.launch
import rdx.works.core.domain.assets.AssetPrice
Expand Down Expand Up @@ -85,7 +86,7 @@ class WalletViewModel @Inject constructor(
private val refreshFlow = MutableSharedFlow<Unit>()
private val accountsFlow = combine(
getProfileUseCase.flow.map { it.activeAccountsOnCurrentNetwork }.distinctUntilChanged(),
refreshFlow
refreshFlow.onStart { emit(Unit) }
) { accounts, _ ->
accounts
}
Expand All @@ -103,7 +104,6 @@ class WalletViewModel @Inject constructor(
observePrompts()
observeAccounts()
observeGlobalAppEvents()
loadAssets(withRefresh = false)
observePromptMessageStates()
}

Expand Down

0 comments on commit c8abf22

Please sign in to comment.