Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
GMALKHA committed Dec 4, 2024
1 parent 6b00a15 commit 1aaa2ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ struct PayPalPaymentState: Equatable {
var approveResultResponse: LoadingState<ApprovalResult> = .idle {
didSet {
if case .loaded(let value) = approveResultResponse {

approveResult = value
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ class PayPalWebViewModel: ObservableObject {
DispatchQueue.main.async {
self.state.authorizedOrderResponse = .loading
}
let payPalClientMetadataID = payPalDataCollector?.collectDeviceData()
if let orderID {
if let orderID = state.createOrder?.id, !orderID.isEmpty {
let payPalClientMetadataID = payPalDataCollector?.collectDeviceData()
let order = try await DemoMerchantAPI.sharedService.completeOrder(
intent: intent,
orderID: orderID,
Expand Down

0 comments on commit 1aaa2ad

Please sign in to comment.