From c5b77149173c3994a3912ba4ab0f3bc16552fa61 Mon Sep 17 00:00:00 2001 From: "Rene Vergara A." Date: Mon, 3 Jun 2024 18:17:50 -0400 Subject: [PATCH] rvv041 - Bug - New address book entry not displaying when address buok list is empty Fixed -> RefreshAddressBook function reviwed and corrected --- src/Zenith/CLI.hs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Zenith/CLI.hs b/src/Zenith/CLI.hs index bf3ee2f..016c962 100644 --- a/src/Zenith/CLI.hs +++ b/src/Zenith/CLI.hs @@ -1491,12 +1491,9 @@ refreshAddressBook s = do L.listSelectedElement $ L.listMoveToBeginning $ s ^. abAddresses return fAdd Just a2 -> return $ Just a2 - case selAddress of - Nothing -> return s - Just (_i, a) -> do - abookList <- getAdrBook pool (s ^. network) - let tL' = L.listReplace (Vec.fromList abookList) (Just 0) (s ^. abAddresses) - return $ s & abAddresses .~ tL' + abookList <- getAdrBook pool (s ^. network) + let tL' = L.listReplace (Vec.fromList abookList) (Just 0) (s ^. abAddresses) + return $ s & abAddresses .~ tL' addNewAddress :: T.Text -> Scope -> State -> IO State addNewAddress n scope s = do