This commit is contained in:
Rene Vergara 2022-12-26 08:20:50 -06:00
parent e4129b2970
commit 9fb2149488
Signed by: pitmutt
GPG key ID: 65122AD495A7F5B2

View file

@ -8,6 +8,7 @@ module ZGoBackend where
import Config import Config
import Control.Concurrent (forkIO, threadDelay) import Control.Concurrent (forkIO, threadDelay)
import Control.Exception (try)
import Control.Monad import Control.Monad
import Control.Monad.IO.Class import Control.Monad.IO.Class
import Data.Aeson import Data.Aeson
@ -1041,8 +1042,10 @@ getZcashPrices = do
-- | Function to update the Zcash prices in the ZGo db -- | Function to update the Zcash prices in the ZGo db
checkZcashPrices :: Pipe -> T.Text -> IO () checkZcashPrices :: Pipe -> T.Text -> IO ()
checkZcashPrices p db = do checkZcashPrices p db = do
q <- getZcashPrices q <- try getZcashPrices
mapM_ (access p master db) (updatePrices (getResponseBody q)) case q of
Left e -> print (e :: HttpException)
Right q1 -> mapM_ (access p master db) (updatePrices (getResponseBody q1))
-- | Function to search for transactions for an address -- | Function to search for transactions for an address
listTxs :: listTxs ::