Updated on 2026-08-14
This commit is contained in:
parent
777ebd58cb
commit
0bc6142ea7
8 changed files with 45 additions and 24 deletions
|
|
@ -40,9 +40,9 @@ internal class UserWalletListModel @Inject constructor(
|
|||
|
||||
init {
|
||||
combine(
|
||||
userWalletsFetcher.userWallets,
|
||||
shouldSaveUserWalletsUseCase(),
|
||||
isWalletSavingInProgress,
|
||||
flow = userWalletsFetcher.userWallets,
|
||||
flow2 = shouldSaveUserWalletsUseCase(),
|
||||
flow3 = isWalletSavingInProgress,
|
||||
transform = ::updateState,
|
||||
).launchIn(modelScope)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,9 +49,9 @@ internal class UserWalletsFetcher @Inject constructor(
|
|||
emit(uiModels)
|
||||
|
||||
combine(
|
||||
getSelectedAppCurrencyUseCase().distinctUntilChanged(),
|
||||
getBalanceHidingSettingsUseCase().distinctUntilChanged(),
|
||||
getWalletTotalBalanceUseCase(wallets.map(UserWallet::walletId)).distinctUntilChanged(),
|
||||
flow = getSelectedAppCurrencyUseCase().distinctUntilChanged(),
|
||||
flow2 = getBalanceHidingSettingsUseCase().distinctUntilChanged(),
|
||||
flow3 = getWalletTotalBalanceUseCase(wallets.map(UserWallet::walletId)).distinctUntilChanged(),
|
||||
) { maybeAppCurrency, balanceHidingSettings, maybeBalances ->
|
||||
val models = createUiModels(
|
||||
wallets = wallets,
|
||||
|
|
@ -99,7 +99,6 @@ internal class UserWalletsFetcher @Inject constructor(
|
|||
appCurrency = appCurrency,
|
||||
balance = balance,
|
||||
isBalanceHidden = balanceHidingSettings.isBalanceHidden,
|
||||
isLoading = maybeBalances.isLoading(),
|
||||
)
|
||||
.convert(userWallet)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,7 +127,6 @@ internal class AddToPortfolioBSContentUMFactory(
|
|||
},
|
||||
appCurrency = portfolioData.appCurrency,
|
||||
balance = balance?.getOrNull(),
|
||||
isLoading = balance?.isLoading() == true,
|
||||
isBalanceHidden = portfolioData.isBalanceHidden,
|
||||
endIcon = if (userWallet.walletId == selectedWalletId) {
|
||||
UserWalletItemUM.EndIcon.Checkmark
|
||||
|
|
|
|||
|
|
@ -147,7 +147,11 @@ internal class WalletWarningsClickIntentsImplementor @Inject constructor(
|
|||
).fold(
|
||||
ifLeft = { Timber.e(it, "Failed to derive public keys") },
|
||||
ifRight = {
|
||||
fetchTokenListUseCase(userWallet.walletId, mode = RefreshMode.SKIP_CURRENCIES).onLeft {
|
||||
fetchTokenListUseCase(
|
||||
userWalletId = userWallet.walletId,
|
||||
mode = RefreshMode.SKIP_CURRENCIES,
|
||||
currencies = missedAddressCurrencies,
|
||||
).onLeft {
|
||||
Timber.e("Unable to refresh token list: $it")
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue