Skip to content

Commit

Permalink
Merge pull request #256 from tangem/IOS-3226_reset_both_codes
Browse files Browse the repository at this point in the history
IOS-3226 Handle both codes resetting
  • Loading branch information
tureck1y authored Mar 21, 2023
2 parents 00fceec + b266094 commit ef61d8d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions TangemSdk/TangemSdk/Operations/ResetCode/ResetPinService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ public class ResetPinService: ObservableObject {
}

repo.accessCode = code.sha256()
currentState = currentState.next()

if currentState == .needCode {
currentState = currentState.next()
}
}

public func setPasscode(_ code: String) throws {
Expand All @@ -65,8 +68,12 @@ public class ResetPinService: ObservableObject {
throw TangemSdkError.passcodeTooShort
}
}

repo.passcode = code.sha256()
currentState = currentState.next()

if currentState == .needCode {
currentState = currentState.next()
}
}

public func proceed(with resetCardId: String? = nil) {
Expand Down

0 comments on commit ef61d8d

Please sign in to comment.