Updated on 2026-08-14

This commit is contained in:
Tangem 2025-11-17 10:45:20 +03:00
parent 1545495d1c
commit 6741e840d0

View file

@ -391,10 +391,16 @@ internal class DefaultWalletsRepository(
override suspend fun associateWallets(applicationId: String, wallets: List<UserWallet>) = override suspend fun associateWallets(applicationId: String, wallets: List<UserWallet>) =
withContext(dispatchers.io) { withContext(dispatchers.io) {
val publicKeys = authProvider.getCardsPublicKeys() val publicKeys = authProvider.getCardsPublicKeys()
val walletsBody = wallets.filterIsInstance<UserWallet.Cold>().map { userWallet -> val walletsBody = wallets.map { userWallet ->
WalletIdBodyConverter.convert( WalletIdBodyConverter.convert(
userWallet = userWallet, userWallet = userWallet,
publicKeys = publicKeys.filterKeys { userWallet.cardsInWallet.contains(it) }, publicKeys = if (userWallet is UserWallet.Cold) {
publicKeys.filterKeys {
userWallet.cardsInWallet.contains(it)
}
} else {
emptyMap()
},
) )
} }