Compare commits
No commits in common. "eb82f250eac750bf915ab5eceee01570d9087d0d" and "4e8c01c8d97c9d383d62686bde992b549788ee70" have entirely different histories.
eb82f250ea
...
4e8c01c8d9
1 changed files with 2 additions and 31 deletions
|
@ -62,7 +62,7 @@ import Control.Monad (forever, void)
|
|||
import Control.Monad.IO.Class (liftIO)
|
||||
import Control.Monad.Logger (LoggingT, runFileLoggingT, runNoLoggingT)
|
||||
import Data.Aeson
|
||||
import Data.HexString (HexString(..), toText)
|
||||
import Data.HexString (toText)
|
||||
import Data.Maybe
|
||||
import qualified Data.Text as T
|
||||
import qualified Data.Text.Encoding as E
|
||||
|
@ -139,7 +139,6 @@ data DisplayType
|
|||
| MsgDisplay
|
||||
| PhraseDisplay
|
||||
| TxDisplay
|
||||
| TxIdDisplay
|
||||
| SyncDisplay
|
||||
| SendDisplay
|
||||
| BlankDisplay
|
||||
|
@ -147,7 +146,6 @@ data DisplayType
|
|||
data Tick
|
||||
= TickVal !Float
|
||||
| TickMsg !String
|
||||
| TickTx !HexString
|
||||
|
||||
data State = State
|
||||
{ _network :: !ZcashNet
|
||||
|
@ -172,7 +170,6 @@ data State = State
|
|||
, _eventDispatch :: !(BC.BChan Tick)
|
||||
, _timer :: !Int
|
||||
, _txForm :: !(Form SendInput () Name)
|
||||
, _sentTx :: !(Maybe HexString)
|
||||
}
|
||||
|
||||
makeLenses ''State
|
||||
|
@ -416,16 +413,6 @@ drawUI s = [splashDialog s, helpDialog s, displayDialog s, inputDialog s, ui s]
|
|||
D.renderDialog
|
||||
(D.dialog (Just $ txt "Message") Nothing 50)
|
||||
(padAll 1 $ strWrap $ st ^. msg)
|
||||
TxIdDisplay ->
|
||||
withBorderStyle unicodeBold $
|
||||
D.renderDialog
|
||||
(D.dialog (Just $ txt "Success") Nothing 50)
|
||||
(padAll 1 $
|
||||
(txt "Tx ID: " <+>
|
||||
txtWrapWith
|
||||
(WrapSettings False True NoFill FillAfterFirst)
|
||||
(maybe "None" toText (st ^. sentTx))) <=>
|
||||
C.hCenter (hBox [capCommand "C" "opy", xCommand]))
|
||||
TxDisplay ->
|
||||
case L.listSelectedElement $ st ^. transactions of
|
||||
Nothing -> emptyWidget
|
||||
|
@ -658,21 +645,16 @@ appEvent (BT.AppEvent t) = do
|
|||
MsgDisplay -> return ()
|
||||
PhraseDisplay -> return ()
|
||||
TxDisplay -> return ()
|
||||
TxIdDisplay -> return ()
|
||||
SyncDisplay -> return ()
|
||||
SendDisplay -> do
|
||||
BT.modify $ set msg m
|
||||
BlankDisplay -> return ()
|
||||
TickTx txid -> do
|
||||
BT.modify $ set sentTx (Just txid)
|
||||
BT.modify $ set displayBox TxIdDisplay
|
||||
TickVal v -> do
|
||||
case s ^. displayBox of
|
||||
AddrDisplay -> return ()
|
||||
MsgDisplay -> return ()
|
||||
PhraseDisplay -> return ()
|
||||
TxDisplay -> return ()
|
||||
TxIdDisplay -> return ()
|
||||
SendDisplay -> return ()
|
||||
SyncDisplay -> do
|
||||
if s ^. barValue == 1.0
|
||||
|
@ -793,16 +775,6 @@ appEvent (BT.VtyEvent e) = do
|
|||
MsgDisplay -> BT.modify $ set displayBox BlankDisplay
|
||||
PhraseDisplay -> BT.modify $ set displayBox BlankDisplay
|
||||
TxDisplay -> BT.modify $ set displayBox BlankDisplay
|
||||
TxIdDisplay -> do
|
||||
case e of
|
||||
V.EvKey (V.KChar 'x') [] ->
|
||||
BT.modify $ set displayBox BlankDisplay
|
||||
V.EvKey (V.KChar 'c') [] -> do
|
||||
liftIO $
|
||||
setClipboard $
|
||||
T.unpack $ maybe "None" toText (s ^. sentTx)
|
||||
BT.modify $ set msg "Copied transaction ID!"
|
||||
_ev -> return ()
|
||||
SendDisplay -> BT.modify $ set displayBox BlankDisplay
|
||||
SyncDisplay -> BT.modify $ set displayBox BlankDisplay
|
||||
BlankDisplay -> do
|
||||
|
@ -1091,7 +1063,6 @@ runZenithCLI config = do
|
|||
eventChan
|
||||
0
|
||||
(mkSendForm 0 $ SendInput "" 0.0 "")
|
||||
Nothing
|
||||
Left e -> do
|
||||
print $
|
||||
"No Zebra node available on port " <>
|
||||
|
@ -1301,7 +1272,7 @@ sendTransaction pool chan zHost zPort znet accId bl amt ua memo = do
|
|||
[Data.Aeson.String $ toText rawTx]
|
||||
case resp of
|
||||
Left e1 -> BC.writeBChan chan $ TickMsg $ "Zebra error: " ++ show e1
|
||||
Right txId -> BC.writeBChan chan $ TickTx txId
|
||||
Right txId -> BC.writeBChan chan $ TickMsg $ "Tx ID: " ++ txId
|
||||
where
|
||||
parseAddress :: T.Text -> IO UnifiedAddress
|
||||
parseAddress a =
|
||||
|
|
Loading…
Reference in a new issue