Remove call to `zcashd` to validate VK

This commit is contained in:
Rene Vergara 2023-10-04 11:19:11 -05:00
parent 493d17abfd
commit 3f3cb9ef7c
Signed by: pitmutt
GPG Key ID: 65122AD495A7F5B2
1 changed files with 2 additions and 19 deletions

View File

@ -1186,25 +1186,8 @@ routes pipe config = do
Nothing -> status badRequest400
Just o' -> do
unless (oviewkey o' /= "") $ do
vkInfo <-
liftAndCatchIO $
makeZcashCall
nodeUser
nodePwd
"z_importviewingkey"
[ Data.Aeson.String (T.strip . T.pack $ q)
, "no"
] -- TODO: Remove this call to the node
let content =
getResponseBody vkInfo :: RpcResponse Object
if isNothing (err content)
then do
_ <-
liftAndCatchIO $ run (upsertViewingKey o' q)
status created201
else do
text $ L.pack . show $ err content
status badRequest400
liftAndCatchIO $ run (upsertViewingKey o' q)
status created201
else status forbidden403
else status badRequest400 -- TODO: add Unified VK support
--Get items associated with the given address