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
1 changed files with 5 additions and 2 deletions

View File

@ -8,6 +8,7 @@ module ZGoBackend where
import Config
import Control.Concurrent (forkIO, threadDelay)
import Control.Exception (try)
import Control.Monad
import Control.Monad.IO.Class
import Data.Aeson
@ -1041,8 +1042,10 @@ getZcashPrices = do
-- | Function to update the Zcash prices in the ZGo db
checkZcashPrices :: Pipe -> T.Text -> IO ()
checkZcashPrices p db = do
q <- getZcashPrices
mapM_ (access p master db) (updatePrices (getResponseBody q))
q <- try getZcashPrices
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
listTxs ::