Publish Zenith beta version #80

Merged
pitmutt merged 90 commits from dev041 into master 2024-05-09 19:15:41 +00:00
Showing only changes of commit 642908a0e0 - Show all commits

View file

@ -215,7 +215,12 @@ appEvent (BT.VtyEvent e) = do
fs <- BT.zoom inputForm $ BT.gets formState fs <- BT.zoom inputForm $ BT.gets formState
nw <- liftIO $ addNewWallet (fs ^. dialogInput) s nw <- liftIO $ addNewWallet (fs ^. dialogInput) s
BT.put nw BT.put nw
BT.modify $ set dialogBox Blank aL <- use accounts
BT.modify $
set dialogBox $
if not (null $ L.listElements aL)
then Blank
else AName
ev -> BT.zoom inputForm $ handleFormEvent (BT.VtyEvent ev) ev -> BT.zoom inputForm $ handleFormEvent (BT.VtyEvent ev)
AName -> do AName -> do
case e of case e of
@ -224,7 +229,7 @@ appEvent (BT.VtyEvent e) = do
BT.modify $ set dialogBox Blank BT.modify $ set dialogBox Blank
fs <- BT.zoom inputForm $ BT.gets formState fs <- BT.zoom inputForm $ BT.gets formState
printMsg $ printMsg $
"Creating new address " <> T.unpack (fs ^. dialogInput) "Creating new account " <> T.unpack (fs ^. dialogInput)
ev -> BT.zoom inputForm $ handleFormEvent (BT.VtyEvent ev) ev -> BT.zoom inputForm $ handleFormEvent (BT.VtyEvent ev)
Blank -> do Blank -> do
case e of case e of
@ -332,8 +337,10 @@ addNewWallet n s = do
T.unpack n T.unpack n
Just _ -> do Just _ -> do
wL <- getWallets (s ^. dbPath) netName wL <- getWallets (s ^. dbPath) netName
return $ let aL =
(s & wallets .~ L.listReplace (Vec.fromList wL) (Just 0) (s ^. wallets)) & L.listFindBy (\x -> zcashWalletName (entityVal x) == n) $
msg .~ L.listReplace (Vec.fromList wL) (Just 0) (s ^. wallets)
"Created new wallet: " ++ return $ (s & wallets .~ aL) & msg .~ "Created new wallet: " ++ T.unpack n
T.unpack n
addNewAccount :: T.Text -> State -> IO State
addNewAccount n s = undefined