From 2e7c313f9a526d3980efb9fba422f036faaad746 Mon Sep 17 00:00:00 2001 From: sahani-deriv Date: Tue, 27 Feb 2024 16:56:35 +0800 Subject: [PATCH] refactor(deriv_auth): rename inavalid to invalid in auth state handler --- .../deriv_auth/lib/core/states/auth_error_state_handler.dart | 2 +- .../deriv_auth/lib/core/states/auth_error_state_mapper.dart | 2 +- .../test/core/states/auth_error_state_mapper_test.dart | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/deriv_auth/lib/core/states/auth_error_state_handler.dart b/packages/deriv_auth/lib/core/states/auth_error_state_handler.dart index 67d1b4515..357721cce 100644 --- a/packages/deriv_auth/lib/core/states/auth_error_state_handler.dart +++ b/packages/deriv_auth/lib/core/states/auth_error_state_handler.dart @@ -53,7 +53,7 @@ base class AuthErrorStateHandler { } /// User is trying to authenticate from an unsupported residence. - void onInavlidResidence(DerivAuthErrorState state) { + void onInvalidResidence(DerivAuthErrorState state) { showErrorDialog( context: context, errorMessage: context.derivAuthLocalization.informInvalidResidence, diff --git a/packages/deriv_auth/lib/core/states/auth_error_state_mapper.dart b/packages/deriv_auth/lib/core/states/auth_error_state_mapper.dart index 44cfa2036..05d10e41a 100644 --- a/packages/deriv_auth/lib/core/states/auth_error_state_mapper.dart +++ b/packages/deriv_auth/lib/core/states/auth_error_state_mapper.dart @@ -33,7 +33,7 @@ void authErrorStateMapper({ authErrorStateHandler.onFailedAuthorization(authErrorState); return; case AuthErrorType.invalidResidence: - authErrorStateHandler.onInavlidResidence(authErrorState); + authErrorStateHandler.onInvalidResidence(authErrorState); return; case AuthErrorType.expiredAccount: authErrorStateHandler.onExpiredAccount(authErrorState); diff --git a/packages/deriv_auth/test/core/states/auth_error_state_mapper_test.dart b/packages/deriv_auth/test/core/states/auth_error_state_mapper_test.dart index 57d983c58..0cf52897c 100644 --- a/packages/deriv_auth/test/core/states/auth_error_state_mapper_test.dart +++ b/packages/deriv_auth/test/core/states/auth_error_state_mapper_test.dart @@ -43,7 +43,7 @@ final class MockAuthErrorStateHandler extends AuthErrorStateHandler { } @override - void onInavlidResidence(DerivAuthErrorState errorState) { + void onInvalidResidence(DerivAuthErrorState errorState) { lastHandledError = errorState; }