Skip to content

Commit

Permalink
Implement remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
Hopsaheysa committed Jan 24, 2024
1 parent 4903413 commit efa509d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ public enum WMTRejectionReason {
/// Operation data does not match (for example when user found a typo or other mistake)
case incorrectData
/// User didn't started this operation
case unexpectedOperation // = "UNEXPECTED_OPERATION"
/// Custom reason of rejection
case unexpectedOperation
/// Represents a custom reason for rejection, allowing for flexibility in specifying rejection reasons.
/// - Parameter reason: A string describing the custom rejection reason, e.g., `POSSIBLE_FRAUD`.
case custom(_ reason: String)

/// Returns a string representation of the rejection reason suitable for serialization.
var serialized: String {
return switch self {
case .unknown: "UNKNOWN"
Expand Down
2 changes: 1 addition & 1 deletion docs/Using-Operations-Service.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ import WultraMobileTokenSDK
import PowerAuth2

// Reject operation with some reason
func reject(operation: WMTOperation, reason: String) {
func reject(operation: WMTOperation, reason: WMTRejectionReason) {
operationService.reject(operation: operation, reason: reason) { error in
if let error = error {
// show error UI
Expand Down

0 comments on commit efa509d

Please sign in to comment.