Add base addressbook to GUI #102

Merged
pitmutt merged 21 commits from rvv041 into milestone3 2024-09-13 11:39:59 +00:00
2 changed files with 6 additions and 10 deletions
Showing only changes of commit 0142ea90ae - Show all commits

View file

@ -1307,20 +1307,16 @@ handleEvent wenv node model evt =
a a
case res of case res of
Nothing -> return $ ShowMessage "Error saving the AddressBook entry..." Nothing -> return $ ShowMessage "Error saving the AddressBook entry..."
Just _ -> loadABList config (model ^. network) Just _ -> do
model $ _abaddressList .~ (getAdrBook pool n) &
return $
-- | -- |
-- | -- |
-- | -- |
loadABList :: Config -> ZcashNet -> IO AppEvent loadABList :: Config -> ZcashNet -> IO AppEvent
loadABList config n = do loadABList config n = do
let dbPath = c_dbPath config pool <- runNoLoggingT $ initPool $ c_dbPath config
pool <- runNoLoggingT $ initPool dbPath
abList <- getAdrBook pool n
if isEmpty abList
then return $ ShowMessage "Error loading the AddressBook list..."
else do
model & abaddressList ?~ abList
return $ ShowMessage "AddressBook loaded successfully!!!"
scanZebra :: T.Text -> T.Text -> Int -> (AppEvent -> IO ()) -> IO () scanZebra :: T.Text -> T.Text -> Int -> (AppEvent -> IO ()) -> IO ()
scanZebra dbPath zHost zPort sendMsg = do scanZebra dbPath zHost zPort sendMsg = do

@ -1 +1 @@
Subproject commit 0b2fae2b5db6878b7669d639a5cb8c73b986906e Subproject commit ce19e174cc636f1e9fce9114875ab0cb1df10213