Skip to content

Commit

Permalink
update delegate to use updateState
Browse files Browse the repository at this point in the history
  • Loading branch information
jaxdesmarais committed Dec 1, 2023
1 parent c137eb7 commit 8cd8cd2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Demo/Demo/ViewModels/PayPalWebViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,7 @@ class PayPalWebViewModel: ObservableObject, PayPalWebCheckoutDelegate {
}

func payPal(_ payPalClient: PayPalWebCheckoutClient, didFinishWithError error: CoreSDKError) {
DispatchQueue.main.async {
self.state = .error(message: error.localizedDescription)
}
updateState(.error(message: error.localizedDescription))
}

func payPalDidCancel(_ payPalClient: PayPalWebCheckoutClient) {
Expand Down

0 comments on commit 8cd8cd2

Please sign in to comment.