Fix bug #2
This commit is contained in:
parent
e4129b2970
commit
9fb2149488
1 changed files with 5 additions and 2 deletions
|
@ -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 ::
|
||||
|
|
Loading…
Reference in a new issue