Implement Account creation #68
1 changed files with 7 additions and 0 deletions
|
@ -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 " ++
|
||||
|
|
Loading…
Reference in a new issue