diff --git a/PaylikeEngine.podspec b/PaylikeEngine.podspec index 76afbf5..0159815 100644 --- a/PaylikeEngine.podspec +++ b/PaylikeEngine.podspec @@ -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. diff --git a/Sources/PaylikeEngine/ViewModel/Engine/PaylikeEngineStateHandling.swift b/Sources/PaylikeEngine/ViewModel/Engine/PaylikeEngineStateHandling.swift index e3c6b00..c084c04 100644 --- a/Sources/PaylikeEngine/ViewModel/Engine/PaylikeEngineStateHandling.swift +++ b/Sources/PaylikeEngine/ViewModel/Engine/PaylikeEngineStateHandling.swift @@ -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)) @@ -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?) {