-handle case of GET purse status prior to deposit
This commit is contained in:
parent
d37d9d9ded
commit
cf74be0ac3
@ -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;
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user