Updated on 2026-08-14
This commit is contained in:
parent
c9b3b3f555
commit
bc93e1bce6
1 changed files with 8 additions and 10 deletions
|
|
@ -66,15 +66,6 @@ internal class AskBiometryModel @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
private fun onAllowClick() {
|
||||
_uiState.update { it.copy(showProgress = true) }
|
||||
allowToUseBiometrics()
|
||||
}
|
||||
|
||||
private fun dontAllow() {
|
||||
params.modelCallbacks.onDenied()
|
||||
}
|
||||
|
||||
fun dismiss() {
|
||||
modelScope.launch {
|
||||
dismissBSFlow.emit(Unit)
|
||||
|
|
@ -83,13 +74,15 @@ internal class AskBiometryModel @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
private fun allowToUseBiometrics() {
|
||||
private fun onAllowClick() {
|
||||
modelScope.launch {
|
||||
if (tangemSdkManager.checkNeedEnrollBiometrics()) {
|
||||
showEnrollBiometricsDialog()
|
||||
return@launch
|
||||
}
|
||||
|
||||
_uiState.update { it.copy(showProgress = true) }
|
||||
|
||||
/*
|
||||
|
||||
* because it will be automatically saved on UserWalletsListManager switch
|
||||
|
|
@ -99,6 +92,7 @@ internal class AskBiometryModel @Inject constructor(
|
|||
uiMessageSender.send(
|
||||
SnackbarMessage(stringReference("No selected user wallet")),
|
||||
)
|
||||
_uiState.update { it.copy(showProgress = false) }
|
||||
|
||||
return@launch
|
||||
}
|
||||
|
|
@ -107,6 +101,10 @@ internal class AskBiometryModel @Inject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
private fun dontAllow() {
|
||||
params.modelCallbacks.onDenied()
|
||||
}
|
||||
|
||||
private suspend fun handleSuccessAllowing(userWallet: UserWallet) {
|
||||
walletsRepository.saveShouldSaveUserWallets(item = true)
|
||||
settingsRepository.setShouldSaveAccessCodes(value = true)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue