Skip to content

Commit

Permalink
Merge pull request #39 from niscy-eudiw/main
Browse files Browse the repository at this point in the history
Fixed error state for Service and Credential Selection when RQESService returns error
  • Loading branch information
stzouvaras authored Dec 3, 2024
2 parents 3b419a2 + dddf55c commit d493698
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,16 @@ final class CredentialSelectionViewModel<Router: RouterGraph>: ViewModel<Router,
}

func nextStep() {
onPause()
openAuthorization()
}

func openAuthorization() {
Task {
do {

let authorizationUrl = try await interactor.openCredentialAuthrorizationURL()
self.onPause()

await UIApplication.shared.openURLIfPossible(authorizationUrl) {
self.setErrorState {
self.setState { $0.copy(error: nil) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ class ServiceSelectionViewModel<Router: RouterGraph>: ViewModel<Router, ServiceS
}

func nextStep() {
onPause()
openAuthorization()
}

Expand All @@ -82,7 +81,9 @@ class ServiceSelectionViewModel<Router: RouterGraph>: ViewModel<Router, ServiceS
self.setState { $0.copy(error: nil) }
}
}

let authorizationUrl = try await interactor.openAuthrorizationURL()
self.onPause()

await UIApplication.shared.openURLIfPossible(authorizationUrl) {
self.setErrorState {
Expand Down

0 comments on commit d493698

Please sign in to comment.