From 24caa550b4e1e84bac5f5a99e5b45f1a76a4536b Mon Sep 17 00:00:00 2001 From: Shishir Rijal <63596895+ShishirRijal@users.noreply.github.com> Date: Mon, 23 Oct 2023 11:43:45 +0545 Subject: [PATCH] fixes dead code --- lib/infrastructure/create_home/create_home_repository.dart | 5 ++--- lib/infrastructure/manage_wifi/manage_wifi_repository.dart | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/infrastructure/create_home/create_home_repository.dart b/lib/infrastructure/create_home/create_home_repository.dart index ef27c58b1..7cb5acb51 100644 --- a/lib/infrastructure/create_home/create_home_repository.dart +++ b/lib/infrastructure/create_home/create_home_repository.dart @@ -205,10 +205,9 @@ class CreateHomeRepository implements ICreateHomeRepository { // log.error(e.toString()); return left(CreateHomeFailure.unexpected(failedValue: e.message)); } + } catch (error) { + return left(CreateHomeFailure.unexpected(failedValue: error.toString())); } - return left( - const CreateHomeFailure.unexpected(failedValue: 'Not implemented yet'), - ); } @override diff --git a/lib/infrastructure/manage_wifi/manage_wifi_repository.dart b/lib/infrastructure/manage_wifi/manage_wifi_repository.dart index 2baa5f1d5..39f59f074 100644 --- a/lib/infrastructure/manage_wifi/manage_wifi_repository.dart +++ b/lib/infrastructure/manage_wifi/manage_wifi_repository.dart @@ -100,7 +100,6 @@ class ManageWiFiRepository implements IManageNetworkRepository { // if (isAPEnabled || true) { return right(unit); // } - return left(const HomeUserFailures.accessPointIsNotOpen()); } catch (e) { return left(const HomeUserFailures.unexpected()); }