Updated on 2026-08-14
This commit is contained in:
parent
20dad876f0
commit
b7eda75279
3 changed files with 10 additions and 1 deletions
|
|
@ -111,7 +111,6 @@ internal class AskBiometryModel @Inject constructor(
|
|||
|
||||
private suspend fun handleSuccessAllowing(userWallet: UserWallet) {
|
||||
walletsRepository.saveShouldSaveUserWallets(item = true)
|
||||
settingsRepository.setShouldSaveAccessCodes(value = true)
|
||||
|
||||
if (hotWalletFeatureToggles.isHotWalletEnabled) {
|
||||
walletsRepository.setUseBiometricAuthentication(value = true)
|
||||
|
|
@ -120,6 +119,7 @@ internal class AskBiometryModel @Inject constructor(
|
|||
isBiometricsRequestPolicy = walletsRepository.requireAccessCode().not(),
|
||||
)
|
||||
} else {
|
||||
settingsRepository.setShouldSaveAccessCodes(value = true)
|
||||
if (userWallet is UserWallet.Cold) {
|
||||
cardSdkConfigRepository.setAccessCodeRequestPolicy(
|
||||
isBiometricsRequestPolicy = userWallet.hasAccessCode,
|
||||
|
|
|
|||
|
|
@ -363,6 +363,9 @@ internal class WalletModel @Inject constructor(
|
|||
is WalletsUpdateActionResolver.Action.RenameWallets -> {
|
||||
stateHolder.update(transformer = RenameWalletsTransformer(renamedWallets = action.renamedWallets))
|
||||
}
|
||||
WalletsUpdateActionResolver.Action.EmptyWallets -> {
|
||||
Timber.w("Wallets list is empty!")
|
||||
}
|
||||
is WalletsUpdateActionResolver.Action.Unknown -> {
|
||||
Timber.w("Unable to perform action: $action")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,6 +25,10 @@ internal class WalletsUpdateActionResolver @Inject constructor(
|
|||
) {
|
||||
|
||||
fun resolve(wallets: List<UserWallet>, currentState: WalletScreenState): Action {
|
||||
if (wallets.isEmpty()) {
|
||||
return Action.EmptyWallets
|
||||
}
|
||||
|
||||
val selectedWallet = getSelectedWalletSyncUseCase().getOrElse {
|
||||
/* Selected user wallet can be null after reset if remaining user wallets is locked */
|
||||
return Action.Unknown
|
||||
|
|
@ -319,6 +323,8 @@ internal class WalletsUpdateActionResolver @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
data object EmptyWallets : Action()
|
||||
|
||||
data object Unknown : Action()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue