gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] branch master updated: -handle case of GET purse status


From: gnunet
Subject: [taler-exchange] branch master updated: -handle case of GET purse status prior to deposit
Date: Wed, 24 Aug 2022 10:26:20 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new cf74be0a -handle case of GET purse status prior to deposit
cf74be0a is described below

commit cf74be0ac3e2190abb2b4a668ef4b600d9ab5062
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Wed Aug 24 10:26:16 2022 +0200

    -handle case of GET purse status prior to deposit
---
 src/exchange/taler-exchange-httpd_purses_get.c | 5 +++--
 src/lib/exchange_api_purses_get.c              | 7 +++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/exchange/taler-exchange-httpd_purses_get.c 
b/src/exchange/taler-exchange-httpd_purses_get.c
index c17f4b07..3261ed34 100644
--- a/src/exchange/taler-exchange-httpd_purses_get.c
+++ b/src/exchange/taler-exchange-httpd_purses_get.c
@@ -431,8 +431,9 @@ TEH_handler_purses_get (struct TEH_RequestContext *rc,
         GNUNET_JSON_pack_allow_null (
           GNUNET_JSON_pack_timestamp ("merge_timestamp",
                                       gc->merge_timestamp)),
-        GNUNET_JSON_pack_timestamp ("deposit_timestamp",
-                                    dt)
+        GNUNET_JSON_pack_allow_null (
+          GNUNET_JSON_pack_timestamp ("deposit_timestamp",
+                                      dt))
         );
   }
   return res;
diff --git a/src/lib/exchange_api_purses_get.c 
b/src/lib/exchange_api_purses_get.c
index 16b0e223..be142e39 100644
--- a/src/lib/exchange_api_purses_get.c
+++ b/src/lib/exchange_api_purses_get.c
@@ -95,6 +95,7 @@ handle_purse_get_finished (void *cls,
   case MHD_HTTP_OK:
     {
       bool no_merge = false;
+      bool no_deposit = false;
       struct TALER_ExchangePublicKeyP exchange_pub;
       struct TALER_ExchangeSignatureP exchange_sig;
       struct GNUNET_JSON_Specification spec[] = {
@@ -102,8 +103,10 @@ handle_purse_get_finished (void *cls,
           GNUNET_JSON_spec_timestamp ("merge_timestamp",
                                       &dr.details.success.merge_timestamp),
           &no_merge),
-        GNUNET_JSON_spec_timestamp ("deposit_timestamp",
-                                    &dr.details.success.deposit_timestamp),
+        GNUNET_JSON_spec_mark_optional (
+          GNUNET_JSON_spec_timestamp ("deposit_timestamp",
+                                      &dr.details.success.deposit_timestamp),
+          &no_deposit),
         TALER_JSON_spec_amount_any ("balance",
                                     &dr.details.success.balance),
         GNUNET_JSON_spec_fixed_auto ("exchange_pub",

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]