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

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

View file

@ -277,17 +277,3 @@ getZcashPrice currency = do
_ -> return Nothing _ -> 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