Updated on 2026-08-14

This commit is contained in:
Tangem 2025-10-02 23:41:01 +03:00
parent 3580350769
commit 8aba7b07d1
49 changed files with 172 additions and 134 deletions

View file

@ -37,14 +37,14 @@ internal class DefaultAnalyticsRepository(
}
override suspend fun setWalletBalanceState(userWalletId: UserWalletId, balanceState: WalletBalanceState) {
appPreferencesStore.editData {
val walletsBalanceState = it.getObjectMap<WalletBalanceState>(
appPreferencesStore.editData { preferences ->
val walletsBalanceState = preferences.getObjectMap<WalletBalanceState>(
key = PreferencesKeys.WALLETS_BALANCES_STATES_KEY,
)
val updatedWalletsBalanceState = walletsBalanceState
.plus(pair = userWalletId.stringValue to balanceState)
it.setObjectMap(PreferencesKeys.WALLETS_BALANCES_STATES_KEY, updatedWalletsBalanceState)
preferences.setObjectMap(PreferencesKeys.WALLETS_BALANCES_STATES_KEY, updatedWalletsBalanceState)
}
}
}