diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-08-24 10:26:16 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-08-24 10:26:16 +0200 |
commit | cf74be0ac3e2190abb2b4a668ef4b600d9ab5062 (patch) | |
tree | 74063f0ba4c61a004a6926158cb4fe599ecd9915 /src/lib | |
parent | d37d9d9ded72e63149efc96b6107d0edee3683a9 (diff) | |
download | exchange-cf74be0ac3e2190abb2b4a668ef4b600d9ab5062.tar.xz |
-handle case of GET purse status prior to deposit
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/exchange_api_purses_get.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/exchange_api_purses_get.c b/src/lib/exchange_api_purses_get.c index 16b0e223e..be142e39c 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", |