Updated on 2026-08-14
This commit is contained in:
parent
6741e840d0
commit
134fd9e8d4
1 changed files with 3 additions and 3 deletions
|
|
@ -288,7 +288,6 @@ internal class DefaultUserWalletsListRepository(
|
|||
|
||||
override suspend fun unlockAllWallets(): Either<UnlockWalletError, Unit> = either {
|
||||
val userWallets = userWalletsSync()
|
||||
val userWalletIds = userWallets.map { it.walletId }.toSet()
|
||||
val biometricKeys = runCatching {
|
||||
userWalletEncryptionKeysRepository.getAllBiometric()
|
||||
}.getOrElse {
|
||||
|
|
@ -309,8 +308,9 @@ internal class DefaultUserWalletsListRepository(
|
|||
removePasswordAttempts(it)
|
||||
}
|
||||
|
||||
// if we cant unlock all wallets
|
||||
if (userWalletIds.all { it in unlockedWalletsIds }.not()) {
|
||||
// if we cant unlock any of the locked wallets, return error
|
||||
// (isLocked remains `true` here because we haven't updated the wallets yet)
|
||||
if (unlockedWallets.any { it.isLocked }.not()) {
|
||||
raise(UnlockWalletError.UnableToUnlock)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue