Skip to content

Commit

Permalink
Merge pull request #3 from kocsislaci/main
Browse files Browse the repository at this point in the history
Fix: State handling
  • Loading branch information
Roverr committed Jun 28, 2023
2 parents c9a0d23 + 2b95a1c commit 19d43ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion PaylikeEngine.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Pod::Spec.new do |s|
s.name = 'PaylikeEngine'
s.swift_version = '5.0'
s.ios.deployment_target = '13.0'
s.version = '0.1.0'
s.version = '0.1.1'
s.summary = 'This library includes the core elements required to implement a payment flow towards the Paylike API.'
s.description = <<-DESC
This library offers a high-level API that facilitates the construction and execution of payment requests towards the Paylike backend.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ extension PaylikeEngine {
* Sets the engine to error state and loads an `e` error object to it
*/
public func prepareError(_ error: Error) {
saveState(newState: .ERROR)

loggingFn(LoggingFormat(t: "Setting error object with: \(error)", state: self.internalState))

Expand All @@ -37,6 +36,9 @@ extension PaylikeEngine {
engineError: error as? EngineError
)
saveErrorObject(newErrorObject: errorObject)
saveState(newState: .ERROR)

loggingFn(LoggingFormat(t: "Error state set with: \(error)", state: self.internalState))
}

func saveErrorObject(newErrorObject: EngineErrorObject?) {
Expand Down

0 comments on commit 19d43ca

Please sign in to comment.