rvv001 - Shield / Deshield form
Fields to display Total transparent funts and total Shielded Funds added. A funtion to update the latest total values has to be included
This commit is contained in:
parent
cf2f77e510
commit
e02551c9ff
1 changed files with 11 additions and 3 deletions
|
@ -135,6 +135,8 @@ data Name
|
|||
| PrivacyFullField
|
||||
| ShieldField
|
||||
| DeshieldField
|
||||
| TotalTranspField
|
||||
| TotalShieldedField
|
||||
deriving (Eq, Show, Ord)
|
||||
|
||||
data DialogInput = DialogInput
|
||||
|
@ -160,7 +162,9 @@ data AdrBookEntry = AdrBookEntry
|
|||
makeLenses ''AdrBookEntry
|
||||
|
||||
data ShDshEntry = ShDshEntry
|
||||
{ _shieldOp :: !ShieldDeshieldOp
|
||||
{ _totalTransparent :: !Float
|
||||
, _totalShielded :: !Float
|
||||
, _shieldOp :: !ShieldDeshieldOp
|
||||
, _shAmt :: !Float
|
||||
} deriving (Show)
|
||||
|
||||
|
@ -668,7 +672,11 @@ mkSendForm bal =
|
|||
mkshieldDeshieldForm :: Integer -> ShDshEntry -> Form ShDshEntry e Name
|
||||
mkshieldDeshieldForm bal =
|
||||
newForm
|
||||
[ label "Select :" @@=
|
||||
[ label "Total Transp. : " @@=
|
||||
editShowableFieldWithValidate totalTransparent TotalTranspField (isAmountValid bal)
|
||||
, label "Total Shielded : " @@=
|
||||
editShowableFieldWithValidate totalShielded TotalShieldedField (isAmountValid bal)
|
||||
, label "Select :" @@=
|
||||
radioField
|
||||
shieldOp
|
||||
[ (Shield, ShieldField, "Shield")
|
||||
|
@ -1537,7 +1545,7 @@ runZenithTUI config = do
|
|||
""
|
||||
Nothing
|
||||
uBal
|
||||
(mkshieldDeshieldForm 0 (ShDshEntry Shield 0.0 ))
|
||||
(mkshieldDeshieldForm 0 (ShDshEntry 0 0 Shield 0.0 ))
|
||||
Left _e -> do
|
||||
print $
|
||||
"No Zebra node available on port " <>
|
||||
|
|
Loading…
Reference in a new issue