Skip to content

Commit 7b6d060

Browse files
committed
Remove uneeded store settings
1 parent b0f5bba commit 7b6d060

File tree

4 files changed

+1
-35
lines changed

4 files changed

+1
-35
lines changed

Storage/Storage/Model/Copiable/Models+Copiable.generated.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,15 @@ extension GeneralStoreSettings {
4444
public func copy(
4545
isTelemetryAvailable: CopiableProp<Bool> = .copy,
4646
telemetryLastReportedTime: NullableCopiableProp<Date> = .copy,
47-
areSimplePaymentTaxesEnabled: CopiableProp<Bool> = .copy,
48-
isStripeExtensionSelected: CopiableProp<Bool> = .copy
47+
areSimplePaymentTaxesEnabled: CopiableProp<Bool> = .copy
4948
) -> GeneralStoreSettings {
5049
let isTelemetryAvailable = isTelemetryAvailable ?? self.isTelemetryAvailable
5150
let telemetryLastReportedTime = telemetryLastReportedTime ?? self.telemetryLastReportedTime
5251
let areSimplePaymentTaxesEnabled = areSimplePaymentTaxesEnabled ?? self.areSimplePaymentTaxesEnabled
53-
let isStripeExtensionSelected = isStripeExtensionSelected ?? self.isStripeExtensionSelected
5452

5553
return GeneralStoreSettings(
5654
isTelemetryAvailable: isTelemetryAvailable,
5755
telemetryLastReportedTime: telemetryLastReportedTime,
58-
isStripeExtensionSelected: isStripeExtensionSelected,
5956
areSimplePaymentTaxesEnabled: areSimplePaymentTaxesEnabled
6057
)
6158
}

Storage/Storage/Model/GeneralStoreSettings.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,11 @@ public struct GeneralStoreSettings: Codable, Equatable, GeneratedCopiable {
2929
///
3030
public let areSimplePaymentTaxesEnabled: Bool
3131

32-
/// Indicates whether the merchant wants to use the Stripe Extension to process payments
33-
///
34-
public let isStripeExtensionSelected: Bool
35-
36-
3732
public init(isTelemetryAvailable: Bool = false,
3833
telemetryLastReportedTime: Date? = nil,
39-
isStripeExtensionSelected: Bool = false,
4034
areSimplePaymentTaxesEnabled: Bool = false) {
4135
self.isTelemetryAvailable = isTelemetryAvailable
4236
self.telemetryLastReportedTime = telemetryLastReportedTime
43-
self.isStripeExtensionSelected = isStripeExtensionSelected
4437
self.areSimplePaymentTaxesEnabled = areSimplePaymentTaxesEnabled
4538
}
4639
}
@@ -53,7 +46,6 @@ extension GeneralStoreSettings {
5346
let container = try decoder.container(keyedBy: CodingKeys.self)
5447

5548
self.isTelemetryAvailable = try container.decodeIfPresent(Bool.self, forKey: .isTelemetryAvailable) ?? false
56-
self.isStripeExtensionSelected = try container.decodeIfPresent(Bool.self, forKey: .isStripeExtensionSelected) ?? false
5749
self.telemetryLastReportedTime = try container.decodeIfPresent(Date.self, forKey: .telemetryLastReportedTime)
5850
self.areSimplePaymentTaxesEnabled = try container.decodeIfPresent(Bool.self, forKey: .areSimplePaymentTaxesEnabled) ?? false
5951

Yosemite/Yosemite/Actions/AppSettingsAction.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,6 @@ public enum AppSettingsAction: Action {
136136
///
137137
case setStripeInPersonPaymentsSwitchState(isEnabled: Bool, onCompletion: (Result<Void, Error>) -> Void)
138138

139-
/// Loads a boolean flag indicating whether the Stripe extension is selected for a given store.
140-
///
141-
case loadStripeExtensionAvailability(siteID: Int64, onCompletion: (Bool) -> Void)
142-
143-
/// Sets a boolean flag indicating whether the Stripe extension is selected for a given store.
144-
///
145-
case setStripeExtensionAvailability(siteID: Int64, isAvailable: Bool, onCompletion: (Result<Void, Error>) -> Void)
146-
147139
/// Sets the state for the Product SKU Input Scanner beta feature switch.
148140
///
149141
case setProductSKUInputScannerFeatureSwitchState(isEnabled: Bool, onCompletion: (Result<Void, Error>) -> Void)

Yosemite/Yosemite/Stores/AppSettingsStore.swift

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,6 @@ public class AppSettingsStore: Store {
197197
loadStripeInPersonPaymentsSwitchState(onCompletion: onCompletion)
198198
case .setStripeInPersonPaymentsSwitchState(isEnabled: let isEnabled, onCompletion: let onCompletion):
199199
setStripeInPersonPaymentsSwitchState(isEnabled: isEnabled, onCompletion: onCompletion)
200-
case .loadStripeExtensionAvailability(siteID: let siteID, onCompletion: let onCompletion):
201-
loadStripeExtensionAvailability(siteID: siteID, onCompletion: onCompletion)
202-
case .setStripeExtensionAvailability(siteID: let siteID, isAvailable: let isAvailable, onCompletion: let onCompletion):
203-
setStripeExtensionAvailability(siteID: siteID, isAvailable: isAvailable, onCompletion: onCompletion)
204200
case .setProductSKUInputScannerFeatureSwitchState(isEnabled: let isEnabled, onCompletion: let onCompletion):
205201
setProductSKUInputScannerFeatureSwitchState(isEnabled: isEnabled, onCompletion: onCompletion)
206202
case .loadProductSKUInputScannerFeatureSwitchState(onCompletion: let onCompletion):
@@ -319,17 +315,6 @@ private extension AppSettingsStore {
319315
}
320316
}
321317

322-
func loadStripeExtensionAvailability(siteID: Int64, onCompletion: @escaping (Bool) -> Void) {
323-
let storeSettings = getStoreSettings(for: siteID)
324-
onCompletion(storeSettings.isStripeExtensionSelected)
325-
}
326-
327-
func setStripeExtensionAvailability(siteID: Int64, isAvailable: Bool, onCompletion: @escaping (Result<Void, Error>) -> Void) {
328-
let storeSettings = getStoreSettings(for: siteID)
329-
let updatedSettings = storeSettings.copy(isStripeExtensionSelected: isAvailable)
330-
setStoreSettings(settings: updatedSettings, for: siteID, onCompletion: onCompletion)
331-
}
332-
333318
/// Sets the state for the Product SKU Input Scanner beta feature switch into `GeneralAppSettings`.
334319
///
335320
func setProductSKUInputScannerFeatureSwitchState(isEnabled: Bool, onCompletion: (Result<Void, Error>) -> Void) {

0 commit comments

Comments
 (0)