summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_responses.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-05-23 16:02:55 +0200
committerChristian Grothoff <christian@grothoff.org>2022-05-23 16:02:55 +0200
commit76b8a2a8de551db8801bd42111bd959a28517cb3 (patch)
tree979340c340161640843371c02bf00cfec7554a0d /src/exchange/taler-exchange-httpd_responses.c
parenta509a91f924cad3b5f0336f78e5c80e3621ad52b (diff)
downloadexchange-76b8a2a8de551db8801bd42111bd959a28517cb3.tar.gz
exchange-76b8a2a8de551db8801bd42111bd959a28517cb3.tar.bz2
exchange-76b8a2a8de551db8801bd42111bd959a28517cb3.zip
include purse deposits in coin history
Diffstat (limited to 'src/exchange/taler-exchange-httpd_responses.c')
-rw-r--r--src/exchange/taler-exchange-httpd_responses.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/src/exchange/taler-exchange-httpd_responses.c b/src/exchange/taler-exchange-httpd_responses.c
index b52f0b88e..0e5c217a9 100644
--- a/src/exchange/taler-exchange-httpd_responses.c
+++ b/src/exchange/taler-exchange-httpd_responses.c
@@ -391,8 +391,33 @@ TEH_RESPONSE_compile_transaction_history (
}
break;
}
- default:
- GNUNET_assert (0);
+
+ case TALER_EXCHANGEDB_TT_PURSE_DEPOSIT:
+ {
+ struct TALER_EXCHANGEDB_PurseDepositListEntry *pd
+ = pos->details.purse_deposit;
+
+ if (0 !=
+ json_array_append_new (
+ history,
+ GNUNET_JSON_PACK (
+ GNUNET_JSON_pack_string ("type",
+ "PURSE-DEPOSIT"),
+ TALER_JSON_pack_amount ("amount",
+ &pd->amount),
+ GNUNET_JSON_pack_string ("exchange_base_url",
+ pd->exchange_base_url),
+ GNUNET_JSON_pack_data_auto ("purse_pub",
+ &pd->purse_pub),
+ GNUNET_JSON_pack_data_auto ("coin_sig",
+ &pd->coin_sig))))
+ {
+ GNUNET_break (0);
+ json_decref (history);
+ return NULL;
+ }
+ break;
+ }
}
}
return history;