Publish Zenith beta version #80
1 changed files with 4 additions and 6 deletions
|
@ -28,10 +28,6 @@ import qualified Data.Text.IO as TIO
|
||||||
import qualified Data.Vector as V
|
import qualified Data.Vector as V
|
||||||
import Data.Word
|
import Data.Word
|
||||||
import GHC.Generics
|
import GHC.Generics
|
||||||
import ZcashHaskell.Orchard (isValidUnifiedAddress)
|
|
||||||
import ZcashHaskell.Sapling (isValidShieldedAddress)
|
|
||||||
|
|
||||||
{-import Haskoin.Address.Bech32-}
|
|
||||||
import Network.HTTP.Simple
|
import Network.HTTP.Simple
|
||||||
import Network.HTTP.Types
|
import Network.HTTP.Types
|
||||||
import Numeric
|
import Numeric
|
||||||
|
@ -43,6 +39,8 @@ import Text.Read (readMaybe)
|
||||||
import Text.Regex
|
import Text.Regex
|
||||||
import Text.Regex.Base
|
import Text.Regex.Base
|
||||||
import Text.Regex.Posix
|
import Text.Regex.Posix
|
||||||
|
import ZcashHaskell.Orchard (isValidUnifiedAddress)
|
||||||
|
import ZcashHaskell.Sapling (isValidShieldedAddress)
|
||||||
|
|
||||||
-- | A type to model Zcash RPC calls
|
-- | A type to model Zcash RPC calls
|
||||||
data RpcCall = RpcCall
|
data RpcCall = RpcCall
|
||||||
|
@ -153,8 +151,8 @@ instance FromJSON AddressGroup where
|
||||||
case c of
|
case c of
|
||||||
Nothing -> return []
|
Nothing -> return []
|
||||||
Just x -> do
|
Just x -> do
|
||||||
x' <- x .: "addresses"
|
x' <- x .:? "addresses"
|
||||||
return $ map (ZcashAddress s1 [Transparent] Nothing) x'
|
return $ maybe [] (map (ZcashAddress s1 [Transparent] Nothing)) x'
|
||||||
processSapling k s2 =
|
processSapling k s2 =
|
||||||
case k of
|
case k of
|
||||||
Nothing -> return []
|
Nothing -> return []
|
||||||
|
|
Loading…
Reference in a new issue