Updated on 2026-08-14

This commit is contained in:
Tangem 2023-07-14 16:28:43 +08:00
parent e0eafb4df9
commit bde99e272b
32 changed files with 384 additions and 184 deletions

View file

@ -22,6 +22,7 @@ import com.tangem.tap.domain.model.builders.UserWalletBuilder
import com.tangem.tap.domain.userWalletList.di.provideBiometricImplementation
import com.tangem.tap.domain.userWalletList.isLockable
import com.tangem.tap.features.wallet.redux.WalletAction
import com.tangem.tap.proxy.redux.DaggerGraphState
import kotlinx.coroutines.launch
import org.rekotlin.Middleware
import timber.log.Timber
@ -110,9 +111,10 @@ internal class SaveWalletMiddleware {
// Enable saving access codes only if this is the first time user save the wallet
if (isFirstSavedWallet) {
preferencesStorage.shouldSaveAccessCodes = true
tangemSdkManager.setAccessCodeRequestPolicy(
useBiometricsForAccessCode = userWallet.hasAccessCode,
)
store.state.daggerGraphState.get(DaggerGraphState::cardSdkConfigRepository)
.setAccessCodeRequestPolicy(
isBiometricsRequestPolicy = userWallet.hasAccessCode,
)
}
val savedUserWallet = userWalletsListManager.selectedUserWalletSync.guard {