Skip to content

Instantly share code, notes, and snippets.

View koke's full-sized avatar

Jorge Bernal koke

View GitHub Profile
diff --git a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/CardPresentPaymentsOnboardingUseCase.swift b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/CardPresentPaymentsOnboardingUseCase.swift
index d26f26b356..a3a0f44a9d 100644
--- a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/CardPresentPaymentsOnboardingUseCase.swift
+++ b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/CardPresentPaymentsOnboardingUseCase.swift
@@ -28,6 +28,26 @@ protocol CardPresentPaymentsOnboardingUseCaseProtocol {
func updateState()
}
+protocol CardPresentPaymentsOnboardingUseCaseStateCheckResultProtocol {
+ var state: CardPresentPaymentOnboardingState { get }
diff --git a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/CardPresentPaymentsOnboardingUseCase.swift b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/CardPresentPaymentsOnboardingUseCase.swift
index d26f26b356..ff25da7b4e 100644
--- a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/CardPresentPaymentsOnboardingUseCase.swift
+++ b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/CardPresentPaymentsOnboardingUseCase.swift
@@ -28,6 +28,26 @@ protocol CardPresentPaymentsOnboardingUseCaseProtocol {
func updateState()
}
+protocol CardPresentPaymentsOnboardingUseCaseStateCheckResultProtocol {
+ var state: CardPresentPaymentOnboardingState { get }
diff --git a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/CardPresentPaymentsOnboardingUseCase.swift b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/CardPresentPaymentsOnboardingUseCase.swift
index d26f26b356..bb4eeb5019 100644
--- a/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/CardPresentPaymentsOnboardingUseCase.swift
+++ b/WooCommerce/Classes/ViewRelated/Dashboard/Settings/In-Person Payments/CardPresentPaymentsOnboardingUseCase.swift
@@ -96,7 +96,7 @@ final class CardPresentPaymentsOnboardingUseCase: CardPresentPaymentsOnboardingU
precondition(state == .selectPlugin)
preferredPluginLocal = plugin
updateState()
- if state == .completed(plugin: plugin) {
+ if state == .completed(plugin: plugin, multipleGateways: true) {
import Storage
enum BetaFeature: CaseIterable {
case viewAddOns
case productSKUScanner
case couponManagement
}
extension BetaFeature {
var title: String {
import Storage
enum BetaFeature {
case viewAddOns
case productSKUScanner
case couponManagement
}
extension BetaFeature {
var title: String {
diff --git a/Hardware/Hardware/CardReader/StripeCardReader/StripeCardReaderService.swift b/Hardware/Hardware/CardReader/StripeCardReader/StripeCardReaderService.swift
index 88d5f9c4e..cf5a438c6 100644
--- a/Hardware/Hardware/CardReader/StripeCardReader/StripeCardReaderService.swift
+++ b/Hardware/Hardware/CardReader/StripeCardReader/StripeCardReaderService.swift
@@ -42,12 +42,12 @@ extension StripeCardReaderService: CardReaderService {
}
public var connectedReaders: AnyPublisher<[CardReader], Never> {
- connectedReadersSubject.eraseToAnyPublisher()
+ connectedReadersSubject.print("🐞💳 connectedReaders").eraseToAnyPublisher()
diff --git a/Yosemite/Yosemite/Model/Payments/CardPresentPaymentsConfiguration.swift b/Yosemite/Yosemite/Model/Payments/CardPresentPaymentsConfiguration.swift
index 0aae4c9b9..8ef7cd097 100644
--- a/Yosemite/Yosemite/Model/Payments/CardPresentPaymentsConfiguration.swift
+++ b/Yosemite/Yosemite/Model/Payments/CardPresentPaymentsConfiguration.swift
@@ -2,25 +2,25 @@ import Foundation
public struct CardPresentPaymentsConfiguration {
private let countryCode: String
- private let stripeTerminalforCanadaEnabled: Bool
diff --git a/WooCommerce/Classes/Analytics/WooAnalyticsEvent.swift b/WooCommerce/Classes/Analytics/WooAnalyticsEvent.swift
index d913d37e1..e4b96334b 100644
--- a/WooCommerce/Classes/Analytics/WooAnalyticsEvent.swift
+++ b/WooCommerce/Classes/Analytics/WooAnalyticsEvent.swift
@@ -551,20 +551,14 @@ extension WooAnalyticsEvent {
static let softwareUpdateType = "software_update_type"
}
- static let unknownGatewayID = "unknown"
-
diff --git a/WooCommerce/Classes/ViewRelated/Orders/Order Details/Issue Refunds/IssueRefundViewModel.swift b/WooCommerce/Classes/ViewRelated/Orders/Order Details/Issue Refunds/IssueRefundViewModel.swift
index 8267b4902..a364969ad 100644
--- a/WooCommerce/Classes/ViewRelated/Orders/Order Details/Issue Refunds/IssueRefundViewModel.swift
+++ b/WooCommerce/Classes/ViewRelated/Orders/Order Details/Issue Refunds/IssueRefundViewModel.swift
@@ -1,3 +1,4 @@
+import Combine
import Foundation
import Yosemite
@@ -119,9 +120,27 @@ final class IssueRefundViewModel {
//
// ContentView.swift
// Updater
//
// Created by Jorge Bernal on 9/9/21.
//
import SwiftUI
struct Arrow: Shape {