Viewing key process enhancements
This commit is contained in:
parent
6bcfbe3bbd
commit
d2dcddbeb2
1 changed files with 2 additions and 2 deletions
|
@ -692,12 +692,12 @@ routes pipe config = do
|
||||||
post "/api/owner" $ do
|
post "/api/owner" $ do
|
||||||
o <- jsonData
|
o <- jsonData
|
||||||
let q = payload (o :: Payload Owner)
|
let q = payload (o :: Payload Owner)
|
||||||
known <- liftAndCatchIO $ listAddresses nodeUser nodePwd
|
|
||||||
if not (opayconf q)
|
if not (opayconf q)
|
||||||
then do
|
then do
|
||||||
_ <- liftAndCatchIO $ run (upsertOwner q)
|
_ <- liftAndCatchIO $ run (upsertOwner q)
|
||||||
status created201
|
status created201
|
||||||
else do
|
else do
|
||||||
|
known <- liftAndCatchIO $ listAddresses nodeUser nodePwd
|
||||||
if oaddress q `elem` map addy known
|
if oaddress q `elem` map addy known
|
||||||
then do
|
then do
|
||||||
_ <- liftAndCatchIO $ run (upsertOwner q)
|
_ <- liftAndCatchIO $ run (upsertOwner q)
|
||||||
|
@ -708,7 +708,7 @@ routes pipe config = do
|
||||||
nodeUser
|
nodeUser
|
||||||
nodePwd
|
nodePwd
|
||||||
"z_importviewingkey"
|
"z_importviewingkey"
|
||||||
[Data.Aeson.String (oviewkey q), "no"]
|
[Data.Aeson.String (T.strip (oviewkey q)), "no"]
|
||||||
let content = getResponseBody vkInfo :: RpcResponse Object
|
let content = getResponseBody vkInfo :: RpcResponse Object
|
||||||
if isNothing (err content)
|
if isNothing (err content)
|
||||||
then do
|
then do
|
||||||
|
|
Loading…
Reference in a new issue