Implement Account creation #68

Merged
pitmutt merged 5 commits from rav001 into dev041 2024-03-01 20:59:58 +00:00
Showing only changes of commit 52d3297fae - Show all commits

View file

@ -60,6 +60,7 @@ import Zenith.DB
data Name
= WList
| AList
| AcList
| TList
| HelpDialog
| DialogInputField
@ -79,6 +80,7 @@ data DialogType
data State = State
{ _network :: !String
, _wallets :: !(L.List Name (Entity ZcashWallet))
, _accounts :: !(L.List Name (Entity ZcashAccount))
, _addresses :: !(L.List Name String)
, _transactions :: !(L.List Name String)
, _msg :: !String
@ -286,11 +288,16 @@ runZenithCLI host port dbFilePath = do
Just chainInfo -> do
initDb dbFilePath
walList <- getWallets dbFilePath $ zgb_net chainInfo
accList <-
if not (null walList)
then getAccounts dbFilePath $ entityKey $ head walList
else return []
void $
M.defaultMain theApp $
State
((show . zgb_net) chainInfo)
(L.list WList (Vec.fromList walList) 1)
(L.list AcList (Vec.fromList accList) 0)
(L.list AList (Vec.fromList ["addr1", "addr2"]) 1)
(L.list TList (Vec.fromList ["tx1", "tx2", "tx3"]) 1)
("Start up Ok! Connected to Zebra " ++