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
|
| PrivacyFullField
|
||||||
| ShieldField
|
| ShieldField
|
||||||
| DeshieldField
|
| DeshieldField
|
||||||
|
| TotalTranspField
|
||||||
|
| TotalShieldedField
|
||||||
deriving (Eq, Show, Ord)
|
deriving (Eq, Show, Ord)
|
||||||
|
|
||||||
data DialogInput = DialogInput
|
data DialogInput = DialogInput
|
||||||
|
@ -160,7 +162,9 @@ data AdrBookEntry = AdrBookEntry
|
||||||
makeLenses ''AdrBookEntry
|
makeLenses ''AdrBookEntry
|
||||||
|
|
||||||
data ShDshEntry = ShDshEntry
|
data ShDshEntry = ShDshEntry
|
||||||
{ _shieldOp :: !ShieldDeshieldOp
|
{ _totalTransparent :: !Float
|
||||||
|
, _totalShielded :: !Float
|
||||||
|
, _shieldOp :: !ShieldDeshieldOp
|
||||||
, _shAmt :: !Float
|
, _shAmt :: !Float
|
||||||
} deriving (Show)
|
} deriving (Show)
|
||||||
|
|
||||||
|
@ -668,7 +672,11 @@ mkSendForm bal =
|
||||||
mkshieldDeshieldForm :: Integer -> ShDshEntry -> Form ShDshEntry e Name
|
mkshieldDeshieldForm :: Integer -> ShDshEntry -> Form ShDshEntry e Name
|
||||||
mkshieldDeshieldForm bal =
|
mkshieldDeshieldForm bal =
|
||||||
newForm
|
newForm
|
||||||
[ label "Select :" @@=
|
[ label "Total Transp. : " @@=
|
||||||
|
editShowableFieldWithValidate totalTransparent TotalTranspField (isAmountValid bal)
|
||||||
|
, label "Total Shielded : " @@=
|
||||||
|
editShowableFieldWithValidate totalShielded TotalShieldedField (isAmountValid bal)
|
||||||
|
, label "Select :" @@=
|
||||||
radioField
|
radioField
|
||||||
shieldOp
|
shieldOp
|
||||||
[ (Shield, ShieldField, "Shield")
|
[ (Shield, ShieldField, "Shield")
|
||||||
|
@ -1537,7 +1545,7 @@ runZenithTUI config = do
|
||||||
""
|
""
|
||||||
Nothing
|
Nothing
|
||||||
uBal
|
uBal
|
||||||
(mkshieldDeshieldForm 0 (ShDshEntry Shield 0.0 ))
|
(mkshieldDeshieldForm 0 (ShDshEntry 0 0 Shield 0.0 ))
|
||||||
Left _e -> do
|
Left _e -> do
|
||||||
print $
|
print $
|
||||||
"No Zebra node available on port " <>
|
"No Zebra node available on port " <>
|
||||||
|
|
Loading…
Reference in a new issue