Add base addressbook to GUI #102
2 changed files with 6 additions and 10 deletions
|
@ -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
|
Loading…
Reference in a new issue