33 lines
895 B
Swift
33 lines
895 B
Swift
//
|
|
// OnBoardingWalletPinViewModel.swift
|
|
// Malinka
|
|
//
|
|
// Created by Juraldinio on 1/15/23.
|
|
// Copyright © 2023 NUT.Tech. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
final class OnBoardingWalletPinViewModel: WalletPinViewModel {
|
|
|
|
private(set) var isPinCleared = false
|
|
|
|
var updatePasswordHandler: ((String) -> Void)?
|
|
var dismissControllerHandler: ((WalletPinController, Bool) -> Void)?
|
|
|
|
override func updatePassword(_ password: String, using controller: WalletPinController) {
|
|
self.updatePasswordHandler?(password)
|
|
}
|
|
|
|
override func dismissController(_ controller: WalletPinController) {
|
|
self.dismissControllerHandler?(controller, self.isPinCleared)
|
|
}
|
|
|
|
override func clearAccountData(from controller: WalletPinController) {
|
|
super.clearAccountData(from: controller)
|
|
|
|
self.isPinCleared = true
|
|
}
|
|
|
|
}
|