From 3f3cb9ef7c62d8ea4bcbe43351b929571eb436a4 Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Wed, 4 Oct 2023 11:19:11 -0500 Subject: [PATCH] Remove call to `zcashd` to validate VK --- src/ZGoBackend.hs | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/src/ZGoBackend.hs b/src/ZGoBackend.hs index 7d9de60..9250006 100644 --- a/src/ZGoBackend.hs +++ b/src/ZGoBackend.hs @@ -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