rvv001 - Commit before first compilation under Kubuntu 24

This commit is contained in:
Rene V. Vergara A. 2024-12-16 16:43:20 -05:00
parent 843821232d
commit d3d5d88bbc
2 changed files with 5 additions and 18 deletions

View file

@ -147,7 +147,7 @@ data AppEvent
| SendShield
| StartSync
| TreeSync
| ShowFIATBalance
| ShowFIATBalance
| CloseFIATBalance
deriving (Eq, Show)
@ -1519,6 +1519,8 @@ handleEvent wenv node model evt =
]
CloseMsgAB -> [Model $ model & msgAB .~ Nothing & inError .~ False]
--
-- Show Balance in FIAT
--
ShowFIATBalance -> [Model $ model & showFIATBalance .~ True & menuPopup .~ False]
CloseFIATBalance -> [Model $ model & showFIATBalance .~ False]
--
@ -1534,8 +1536,7 @@ handleEvent wenv node model evt =
[ Task $ updAddrBookDescrip (model ^. configuration) d a
, Model $
model & abdescrip .~ "" & abaddress .~ "" & updateABAddress .~ False &
showABAddress .~
False
showABAddress .~ False
, Task $ do
dbPool <- runNoLoggingT $ initPool $ c_dbPath $ model ^. configuration
abList <- getAdrBook dbPool $ model ^. network

View file

@ -276,18 +276,4 @@ getZcashPrice currency = do
_ -> return Nothing
_ -> return Nothing
_ -> return Nothing
-- Function to test if CoinGecko supports a currency code
chkCurrencyCode :: T.Text -> IO ( Bool )
chkCurrencyCode c = do
if T.length c == 3
then do
value <- getZcashPrice $ T.toLower c
case value of
Just v -> return True
Nothing -> return False
else return False
-- | Helper function to display small amounts of ZEC
displayValue :: Double -> Integer -> String
displayValue zp bal = printf "%.2f" $ zp * fromIntegral bal