Compare commits

..

No commits in common. "d050c0c040dcb5fc3783b0a398a354dc213e31ef" and "7189ddcb2ad0ec242ed31de287073a59e55974e8" have entirely different histories.

2 changed files with 5 additions and 22 deletions

View file

@ -10,7 +10,7 @@ import qualified Brick.BChan as BC
import qualified Brick.Focus as F
import Brick.Forms
( Form(..)
, radioField
, (@@=)
, allFieldsValid
, editShowableFieldWithValidate
, editTextField
@ -21,7 +21,6 @@ import Brick.Forms
, renderForm
, setFieldValid
, updateFormState
, (@@=)
)
import qualified Brick.Main as M
import qualified Brick.Types as BT
@ -95,7 +94,6 @@ import Zenith.Types
, PhraseDB(..)
, UnifiedAddressDB(..)
, ZcashNetDB(..)
, PrivacyPolicy(..)
)
import Zenith.Utils
( displayTaz
@ -121,10 +119,6 @@ data Name
| ABList
| DescripField
| AddressField
| PrivacyNoneField
| PrivacyLowField
| PrivacyMediumField
| PrivacyFullField
deriving (Eq, Show, Ord)
data DialogInput = DialogInput
@ -137,7 +131,6 @@ data SendInput = SendInput
{ _sendTo :: !T.Text
, _sendAmt :: !Float
, _sendMemo :: !T.Text
, _policyField :: !PrivacyPolicy
} deriving (Show)
makeLenses ''SendInput
@ -178,8 +171,6 @@ data Tick
| TickMsg !String
| TickTx !HexString
data DropDownItem = DropdownItem String
data State = State
{ _network :: !ZcashNet
, _wallets :: !(L.List Name (Entity ZcashWallet))
@ -616,12 +607,6 @@ mkSendForm bal =
, label "Amount: " @@=
editShowableFieldWithValidate sendAmt AmtField (isAmountValid bal)
, label "Memo: " @@= editTextField sendMemo MemoField (Just 1)
, label "Privacy Level :" @@=
radioField policyField [ (None, PrivacyNoneField, "None")
, (Low, PrivacyLowField, "Low")
, (Medium, PrivacyMediumField, "Medium")
, (Full, PrivacyFullField, "Full")
]
]
where
isAmountValid :: Integer -> Float -> Bool
@ -1140,8 +1125,7 @@ appEvent (BT.VtyEvent e) = do
(SendInput
(addressBookAbaddress (entityVal a))
0.0
""
None)
"")
BT.modify $ set dialogBox SendTx
_ -> do
BT.modify $
@ -1313,7 +1297,7 @@ appEvent (BT.VtyEvent e) = do
V.EvKey (V.KChar 's') [] -> do
BT.modify $
set txForm $
mkSendForm (s ^. balance) (SendInput "" 0.0 "" None)
mkSendForm (s ^. balance) (SendInput "" 0.0 "")
BT.modify $ set dialogBox SendTx
V.EvKey (V.KChar 'b') [] ->
BT.modify $ set dialogBox AdrBook
@ -1448,7 +1432,7 @@ runZenithTUI config = do
1.0
eventChan
0
(mkSendForm 0 $ SendInput "" 0.0 "" None)
(mkSendForm 0 $ SendInput "" 0.0 "")
(L.list ABList (Vec.fromList abookList) 1)
(mkNewABForm (AdrBookEntry "" ""))
""

View file

@ -203,7 +203,6 @@ data PrivacyPolicy
| Medium
| Low
| None
deriving (Eq, Show, Read, Ord)
$(deriveJSON defaultOptions ''PrivacyPolicy)