diff --git a/lib/features/login/presentation/widgets/forgot_passcode_form.dart b/lib/features/login/presentation/widgets/forgot_passcode_form.dart index 0da3c35a5..fc1d54555 100644 --- a/lib/features/login/presentation/widgets/forgot_passcode_form.dart +++ b/lib/features/login/presentation/widgets/forgot_passcode_form.dart @@ -28,14 +28,14 @@ class ForgotPasscodeForm extends StatelessWidget { InputValidator( forceErrorMessage: true, validate: (text) async { - final either = + final emailExistsResult = await sl().emailExists(text); - return either.fold( - (l) => const Left(Strings.emailValidationError), - (r) => r - ? const Left(Strings.forgotPasscodeNoAccountExists) - : const Right(null), + return emailExistsResult.fold( + (error) => const Left(Strings.emailValidationError), + (emailExists) => emailExists + ? const Right(null) + : const Left(Strings.forgotPasscodeNoAccountExists), ); }, ),