Updated on 2026-08-14

This commit is contained in:
Tangem 2025-09-15 12:56:45 +03:00
parent 4d39c744a7
commit 2d79953060
6 changed files with 48 additions and 29 deletions

View file

@ -140,13 +140,20 @@ internal class CreateWalletSelectionModel @Inject constructor(
return
}
saveWalletUseCase(userWallet).fold(
saveWalletUseCase(userWallet = userWallet).fold(
ifLeft = {
delay(HIDE_PROGRESS_DELAY)
setLoading(false)
when (it) {
is SaveWalletError.DataError -> Timber.e(it.toString(), "Unable to save user wallet")
is SaveWalletError.WalletAlreadySaved -> appRouter.replaceAll(AppRoute.Wallet)
is SaveWalletError.WalletAlreadySaved -> {
userWalletsListRepository.unlock(
userWalletId = userWallet.walletId,
unlockMethod = UserWalletsListRepository.UnlockMethod.Scan(scanResponse),
).onRight {
appRouter.replaceAll(AppRoute.Wallet)
}
}
}
},
ifRight = {