Publish Zenith beta version #80
1 changed files with 8 additions and 2 deletions
|
@ -614,7 +614,10 @@ runZenithCLI config = do
|
|||
if not (null addrList)
|
||||
then getUserTx dbFilePath $ entityKey $ head addrList
|
||||
else return []
|
||||
block <- getMaxWalletBlock dbFilePath
|
||||
let block =
|
||||
if not (null walList)
|
||||
then zcashWalletLastSync $ entityVal $ head walList
|
||||
else 0
|
||||
bal <-
|
||||
if not (null accList)
|
||||
then getBalance dbFilePath $ entityKey $ head accList
|
||||
|
@ -658,6 +661,7 @@ refreshWallet s = do
|
|||
Just (_j, w1) -> return w1
|
||||
Just (_k, w) -> return w
|
||||
aL <- getAccounts (s ^. dbPath) $ entityKey selWallet
|
||||
let bl = zcashWalletLastSync $ entityVal selWallet
|
||||
addrL <-
|
||||
if not (null aL)
|
||||
then getAddresses (s ^. dbPath) $ entityKey $ head aL
|
||||
|
@ -674,7 +678,9 @@ refreshWallet s = do
|
|||
let addrL' = L.listReplace (Vec.fromList addrL) (Just 0) (s ^. addresses)
|
||||
let txL' = L.listReplace (Vec.fromList txL) (Just 0) (s ^. transactions)
|
||||
return $
|
||||
(s & accounts .~ aL') & balance .~ bal & addresses .~ addrL' & transactions .~
|
||||
(s & accounts .~ aL') & syncBlock .~ bl & balance .~ bal & addresses .~
|
||||
addrL' &
|
||||
transactions .~
|
||||
txL' &
|
||||
msg .~
|
||||
"Switched to wallet: " ++
|
||||
|
|
Loading…
Reference in a new issue