@@ -443,15 +443,12 @@ private extension CardPresentPaymentStore {
443443 switch result {
444444 case . success( let wcpayAccount) :
445445 let account = wcpayAccount. toPaymentGatewayAccount ( siteID: siteID)
446- print ( " ==== CPPS successfully fetched WCPay account " )
447446 self . upsertStoredAccountInBackground ( readonlyAccount: account)
448- case . failure:
449- print ( " ==== CPPS was unable to fetch WCPay account " )
450- DDLogDebug ( " Error fetching WCPay account - it is possible the extension is not installed or inactive " )
447+ onCompletion ( . success( ( ) ) )
448+ case . failure( let error) :
451449 self . deleteStaleAccount ( siteID: siteID, gatewayID: WCPayAccount . gatewayID)
450+ onCompletion ( . failure( error) )
452451 }
453-
454- onCompletion ( . success( ( ) ) ) // TODO - consider bringing back Error, although callers don't currently use it
455452 }
456453 }
457454
@@ -467,14 +464,12 @@ private extension CardPresentPaymentStore {
467464 switch result {
468465 case . success( let stripeAccount) :
469466 let account = stripeAccount. toPaymentGatewayAccount ( siteID: siteID)
470- print ( " ==== CPPS successfully fetched Stripe account " )
471467 self . upsertStoredAccountInBackground ( readonlyAccount: account)
472- case . failure :
473- print ( " ==== CPPS was unable to fetch Stripe account " )
468+ onCompletion ( . success ( ( ) ) )
469+ case . failure ( let error ) :
474470 self . deleteStaleAccount ( siteID: siteID, gatewayID: StripeAccount . gatewayID)
471+ onCompletion ( . failure( error) )
475472 }
476-
477- onCompletion ( . success( ( ) ) ) // TODO - consider bringing back Error, although callers don't currently use it
478473 }
479474 }
480475
0 commit comments