Updated on 2026-08-14
This commit is contained in:
parent
1545495d1c
commit
6741e840d0
1 changed files with 8 additions and 2 deletions
|
|
@ -391,10 +391,16 @@ internal class DefaultWalletsRepository(
|
|||
override suspend fun associateWallets(applicationId: String, wallets: List<UserWallet>) =
|
||||
withContext(dispatchers.io) {
|
||||
val publicKeys = authProvider.getCardsPublicKeys()
|
||||
val walletsBody = wallets.filterIsInstance<UserWallet.Cold>().map { userWallet ->
|
||||
val walletsBody = wallets.map { userWallet ->
|
||||
WalletIdBodyConverter.convert(
|
||||
userWallet = userWallet,
|
||||
publicKeys = publicKeys.filterKeys { userWallet.cardsInWallet.contains(it) },
|
||||
publicKeys = if (userWallet is UserWallet.Cold) {
|
||||
publicKeys.filterKeys {
|
||||
userWallet.cardsInWallet.contains(it)
|
||||
}
|
||||
} else {
|
||||
emptyMap()
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue