Fix swiftlint warnings (#544)

* 0.0.1-40

* - [#543] Fix swiftlint warnings
This commit is contained in:
Francisco Gindre 2023-02-16 11:15:47 -03:00 committed by GitHub
parent 2d5c70aa94
commit 931569eeea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 8 deletions

View File

@ -8,7 +8,7 @@ import ComposableArchitecture
import FirebaseCore
import FirebaseCrashlytics
extension CrashReporterClient: DependencyKey {
static let liveValue: CrashReporterClient = CrashReporterClient(
static let liveValue = CrashReporterClient(
configure: { canConfigure in
let fileName = "GoogleService-Info.plist"
@ -35,7 +35,6 @@ extension CrashReporterClient: DependencyKey {
},
optOut: {
Crashlytics.crashlytics().setCrashlyticsCollectionEnabled(false)
}
)
}

View File

@ -7,7 +7,7 @@
import ComposableArchitecture
extension CrashReporterClient: TestDependencyKey {
static let testValue: CrashReporterClient = CrashReporterClient(
static let testValue = CrashReporterClient(
configure: { _ in },
testCrash: {},
optIn: {},

View File

@ -34,7 +34,6 @@ extension UserPreferencesStorageClient: DependencyKey {
}()
}
extension UserPreferencesStorage {
static let live = UserPreferencesStorage(
appSessionFrom: Date().timeIntervalSince1970,

View File

@ -16,7 +16,7 @@ struct SettingsReducer: ReducerProtocol {
var phraseDisplayState: RecoveryPhraseDisplayReducer.State
var rescanDialog: ConfirmationDialogState<SettingsReducer.Action>?
@BindableState var isCrashReportingOn: Bool
@BindingState var isCrashReportingOn: Bool
var tempSDKDir: URL {
let tempDir = FileManager.default.temporaryDirectory
@ -94,7 +94,7 @@ struct SettingsReducer: ReducerProtocol {
crashReporter.optIn()
}
return .run { [state] send in
return .run { [state] _ in
await userStoredPreferences.setIsUserOptedOutOfCrashReporting(state.isCrashReportingOn)
}

View File

@ -7,8 +7,9 @@ struct SettingsView: View {
var body: some View {
WithViewStore(store) { viewStore in
VStack(spacing: 40) {
Toggle("Enable Crash Reporting",
isOn: viewStore.binding(\.$isCrashReportingOn)
Toggle(
"Enable Crash Reporting",
isOn: viewStore.binding(\.$isCrashReportingOn)
)
Button(
action: { viewStore.send(.backupWalletAccessRequest) },