From f21700f88bbb08fc1c5b4c142eeb5b5b4e43e74b Mon Sep 17 00:00:00 2001 From: Rene Vergara Date: Mon, 19 Jun 2023 16:58:39 -0500 Subject: [PATCH] Improve payment confirmation --- src/Owner.hs | 6 +++++- src/ZGoBackend.hs | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Owner.hs b/src/Owner.hs index 9649779..e1dbfa2 100644 --- a/src/Owner.hs +++ b/src/Owner.hs @@ -366,8 +366,12 @@ instance ToJSON OwnerSettings where , "expiration" .= e , "payconf" .= pc , "crmToken" .= cT - , "viewkey" .= (T.take 8 vK <> "...." <> T.takeEnd 8 vK) + , "viewkey" .= keyObfuscate vK ] + where + keyObfuscate s + | s == "" = "" + | otherwise = T.take 8 s <> "...." <> T.takeEnd 8 s -- Helper Functions getOwnerSettings :: Owner -> OwnerSettings diff --git a/src/ZGoBackend.hs b/src/ZGoBackend.hs index 5e82036..dfb8bb7 100644 --- a/src/ZGoBackend.hs +++ b/src/ZGoBackend.hs @@ -1442,6 +1442,7 @@ scanPayments config pipe = do mapM_ (findPaidOrders config pipe) validShopAddresses where findPaidOrders :: Config -> Pipe -> T.Text -> IO () findPaidOrders c p z = do + print z paidTxs <- listTxs (c_nodeUser c) (c_nodePwd c) z 5 case paidTxs of Right txs -> do