From d3d5d88bbcc6cf6a12eb8595afd3e33ad0a1f4e0 Mon Sep 17 00:00:00 2001 From: "Rene Vergara A." Date: Mon, 16 Dec 2024 16:43:20 -0500 Subject: [PATCH] rvv001 - Commit before first compilation under Kubuntu 24 --- src/Zenith/GUI.hs | 7 ++++--- src/Zenith/Utils.hs | 16 +--------------- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/src/Zenith/GUI.hs b/src/Zenith/GUI.hs index fa991bf..d388064 100644 --- a/src/Zenith/GUI.hs +++ b/src/Zenith/GUI.hs @@ -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 diff --git a/src/Zenith/Utils.hs b/src/Zenith/Utils.hs index 9c3d6a6..e3c2dd6 100644 --- a/src/Zenith/Utils.hs +++ b/src/Zenith/Utils.hs @@ -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 + \ No newline at end of file