diff --git a/Authorization/Authorization/Presentation/AuthorizationAnalytics.swift b/Authorization/Authorization/Presentation/AuthorizationAnalytics.swift index 240f60fa..103d64a1 100644 --- a/Authorization/Authorization/Presentation/AuthorizationAnalytics.swift +++ b/Authorization/Authorization/Presentation/AuthorizationAnalytics.swift @@ -12,7 +12,7 @@ import OEXFoundation public enum AuthMethod: Equatable { case password case SSO - case socailAuth(SocialAuthMethod) + case socialAuth(SocialAuthMethod) public var analyticsValue: String { switch self { @@ -20,7 +20,7 @@ public enum AuthMethod: Equatable { "password" case .SSO: "SSO" - case .socailAuth(let socialAuthMethod): + case .socialAuth(let socialAuthMethod): socialAuthMethod.rawValue } } diff --git a/Authorization/Authorization/Presentation/Login/SignInViewModel.swift b/Authorization/Authorization/Presentation/Login/SignInViewModel.swift index 7fb59172..17180a06 100644 --- a/Authorization/Authorization/Presentation/Login/SignInViewModel.swift +++ b/Authorization/Authorization/Presentation/Login/SignInViewModel.swift @@ -133,7 +133,7 @@ public class SignInViewModel: ObservableObject { analytics.identify(id: "\(user.id)", username: user.username, email: user.email) analytics.userLogin(method: authMethod) var postLoginData: PostLoginData? - if case .socailAuth(let socialMethod) = authMethod { + if case .socialAuth(let socialMethod) = authMethod { postLoginData = PostLoginData(authMethod: socialMethod.rawValue, showSocialRegisterBanner: false) } router.showMainOrWhatsNewScreen(sourceScreen: sourceScreen, postLoginData: postLoginData) diff --git a/Authorization/Authorization/Presentation/Registration/SignUpViewModel.swift b/Authorization/Authorization/Presentation/Registration/SignUpViewModel.swift index ffbc25e2..88af3477 100644 --- a/Authorization/Authorization/Presentation/Registration/SignUpViewModel.swift +++ b/Authorization/Authorization/Presentation/Registration/SignUpViewModel.swift @@ -141,7 +141,7 @@ public final class SignUpViewModel: ObservableObject { analytics.registrationSuccess(method: authMetod.analyticsValue) isShowProgress = false var postLoginData: PostLoginData? - if case .socailAuth(let socialMethod) = authMethod { + if case .socialAuth(let socialMethod) = authMethod { postLoginData = PostLoginData(authMethod: socialMethod.rawValue, showSocialRegisterBanner: false) } router.showMainOrWhatsNewScreen(sourceScreen: sourceScreen, postLoginData: postLoginData) @@ -202,7 +202,7 @@ public final class SignUpViewModel: ObservableObject { analytics.userLogin(method: authMethod) isShowProgress = false var postLoginData: PostLoginData? - if case .socailAuth(let socialMethod) = authMethod { + if case .socialAuth(let socialMethod) = authMethod { postLoginData = PostLoginData(authMethod: socialMethod.rawValue, showSocialRegisterBanner: true) } router.showMainOrWhatsNewScreen(sourceScreen: sourceScreen, postLoginData: postLoginData) diff --git a/Authorization/Authorization/Presentation/SocialAuth/SocialAuthViewModel.swift b/Authorization/Authorization/Presentation/SocialAuth/SocialAuthViewModel.swift index 4182c390..8ebd6e35 100644 --- a/Authorization/Authorization/Presentation/SocialAuth/SocialAuthViewModel.swift +++ b/Authorization/Authorization/Presentation/SocialAuth/SocialAuthViewModel.swift @@ -35,13 +35,13 @@ enum SocialAuthDetails { var authMethod: AuthMethod { switch self { case .apple: - .socailAuth(.apple) + .socialAuth(.apple) case .facebook: - .socailAuth(.facebook) + .socialAuth(.facebook) case .google: - .socailAuth(.google) + .socialAuth(.google) case .microsoft: - .socailAuth(.microsoft) + .socialAuth(.microsoft) } } diff --git a/Authorization/AuthorizationTests/Presentation/Login/SignInViewModelTests.swift b/Authorization/AuthorizationTests/Presentation/Login/SignInViewModelTests.swift index 0b6c1c96..116864cc 100644 --- a/Authorization/AuthorizationTests/Presentation/Login/SignInViewModelTests.swift +++ b/Authorization/AuthorizationTests/Presentation/Login/SignInViewModelTests.swift @@ -177,7 +177,7 @@ final class SignInViewModelTests: XCTestCase { .apple(.init(name: "name", email: "email", token: "239i2oi3jrf2jflkj23lf2f")) ) let validationErrorMessage = AuthLocalization.Error.accountNotRegistered( - AuthMethod.socailAuth(.apple).analyticsValue, + AuthMethod.socialAuth(.apple).analyticsValue, viewModel.config.platformName ) let validationError = CustomValidationError(statusCode: 400, data: ["error_description": validationErrorMessage]) diff --git a/Core/Core/View/Base/LogistrationBottomView.swift b/Core/Core/View/Base/LogistrationBottomView.swift index 59e4b7c6..08b6197b 100644 --- a/Core/Core/View/Base/LogistrationBottomView.swift +++ b/Core/Core/View/Base/LogistrationBottomView.swift @@ -28,15 +28,13 @@ public enum LogistrationAction: Sendable { } public struct PostLoginData: Sendable { - public var authMethod: String = "" - public var showSocialRegisterBanner: Bool = false + public let authMethod: String + public var showSocialRegisterBanner: Bool - public init(authMethod: String, showSocialRegisterBanner: Bool) { + public init(authMethod: String = "", showSocialRegisterBanner: Bool = false) { self.authMethod = authMethod self.showSocialRegisterBanner = showSocialRegisterBanner } - - public init() {} } public struct LogistrationBottomView: View {