rvv041 - Code Optimizations

addressBookDescrip changed to addressBookAbdescrip
	 DB.hs and CLI.hs source files affected
This commit is contained in:
Rene V. Vergara A. 2024-06-03 15:00:05 -04:00
parent 772025e317
commit ddbd08d474
2 changed files with 7 additions and 7 deletions

View file

@ -666,7 +666,7 @@ listDrawAB sel ab =
if sel
then withAttr abSelAttr (txt $ " " <> s )
else txt $ " " <> s
in selStr $ addressBookDescrip (entityVal ab)
in selStr $ addressBookAbdescrip (entityVal ab)
customAttr :: A.AttrName
customAttr = L.listSelectedAttr <> A.attrName "custom"
@ -1054,7 +1054,7 @@ appEvent (BT.VtyEvent e) = do
BT.modify $
set msg $
"Address copied to Clipboard from >>\n" ++
T.unpack (addressBookDescrip (entityVal a)) ++ "->\n" ++
T.unpack (addressBookAbdescrip (entityVal a)) ++ "->\n" ++
T.unpack (addressBookAbaddress (entityVal a)) ++ "!"
BT.modify $ set displayBox MsgDisplay
_ -> do
@ -1078,7 +1078,7 @@ appEvent (BT.VtyEvent e) = do
BT.modify $ set abCurAdrs (addressBookAbaddress (entityVal a))
BT.modify $
set abForm $
mkNewABForm (AdrBookEntry (addressBookDescrip (entityVal a)) (addressBookAbaddress (entityVal a)))
mkNewABForm (AdrBookEntry (addressBookAbdescrip (entityVal a)) (addressBookAbaddress (entityVal a)))
BT.modify $ set dialogBox AdrBookUpdForm
_ -> do
BT.modify $ set dialogBox Blank
@ -1089,7 +1089,7 @@ appEvent (BT.VtyEvent e) = do
BT.modify $ set abCurAdrs (addressBookAbaddress (entityVal a))
BT.modify $
set abForm $
mkNewABForm (AdrBookEntry (addressBookDescrip (entityVal a)) (addressBookAbaddress (entityVal a)))
mkNewABForm (AdrBookEntry (addressBookAbdescrip (entityVal a)) (addressBookAbaddress (entityVal a)))
BT.modify $ set dialogBox AdrBookDelForm
_ -> do
BT.modify $ set dialogBox Blank
@ -1103,7 +1103,7 @@ appEvent (BT.VtyEvent e) = do
Just (_, a) -> do
BT.modify $ set abTxt $ T.pack $
" Descr: " ++
T.unpack (addressBookDescrip (entityVal a)) ++
T.unpack (addressBookAbdescrip (entityVal a)) ++
"\n Address: " ++
T.unpack (addressBookAbaddress (entityVal a))
BT.modify $ set displayBox AdrBookEntryDisplay

View file

@ -248,7 +248,7 @@ share
deriving Show Eq
AddressBook
network ZcashNetDB
descrip T.Text
abdescrip T.Text
abaddress T.Text
UniqueABA abaddress
deriving Show Eq
@ -1500,7 +1500,7 @@ updateAdrsInAdrBook pool d a ia = do
PS.retryOnBusy $
flip PS.runSqlPool pool $ do
update $ \ab -> do
set ab [AddressBookDescrip =. val d, AddressBookAbaddress =. val a]
set ab [AddressBookAbdescrip =. val d, AddressBookAbaddress =. val a]
where_ $ ab ^. AddressBookAbaddress ==. val ia
-- | Get one AddrssBook record using the Address as a key