summaryrefslogtreecommitdiff
path: root/src/exchange
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-05-08 13:18:36 +0200
committerChristian Grothoff <christian@grothoff.org>2017-05-08 13:18:36 +0200
commit20aad54c3e010020185c76d9e0727f3f497c2f73 (patch)
tree37013453e198452b30710fb9165a2f5389cb6af9 /src/exchange
parent2dcaffe4510410e568d637c1e251e230e2df41d9 (diff)
downloadexchange-20aad54c3e010020185c76d9e0727f3f497c2f73.tar.gz
exchange-20aad54c3e010020185c76d9e0727f3f497c2f73.tar.bz2
exchange-20aad54c3e010020185c76d9e0727f3f497c2f73.zip
remove dead transfer details field from reserves_in (API, exchangedb, etc.)
Diffstat (limited to 'src/exchange')
-rw-r--r--src/exchange/taler-exchange-httpd_db.c15
-rw-r--r--src/exchange/taler-exchange-httpd_responses.c3
-rw-r--r--src/exchange/taler-exchange-wirewatch.c4
3 files changed, 15 insertions, 7 deletions
diff --git a/src/exchange/taler-exchange-httpd_db.c b/src/exchange/taler-exchange-httpd_db.c
index 085438d60..0634e34f6 100644
--- a/src/exchange/taler-exchange-httpd_db.c
+++ b/src/exchange/taler-exchange-httpd_db.c
@@ -1867,6 +1867,7 @@ TEH_DB_execute_admin_add_incoming (struct MHD_Connection *connection,
{
struct TALER_EXCHANGEDB_Session *session;
int ret;
+ void *json_str;
if (NULL == (session = TEH_plugin->get_session (TEH_plugin->cls)))
{
@@ -1874,15 +1875,23 @@ TEH_DB_execute_admin_add_incoming (struct MHD_Connection *connection,
return TEH_RESPONSE_reply_internal_db_error (connection,
TALER_EC_DB_SETUP_FAILED);
}
+ json_str = json_dumps (transfer_details,
+ JSON_INDENT(2));
+ if (NULL == json_str)
+ {
+ GNUNET_break (0);
+ return TEH_RESPONSE_reply_internal_db_error (connection,
+ TALER_EC_PARSER_OUT_OF_MEMORY);
+ }
ret = TEH_plugin->reserves_in_insert (TEH_plugin->cls,
session,
reserve_pub,
amount,
execution_time,
sender_account_details,
- "FIXME",
- 5,
- transfer_details);
+ json_str,
+ strlen (json_str));
+ free (json_str);
if (GNUNET_SYSERR == ret)
{
GNUNET_break (0);
diff --git a/src/exchange/taler-exchange-httpd_responses.c b/src/exchange/taler-exchange-httpd_responses.c
index a839413b7..f9051f0b4 100644
--- a/src/exchange/taler-exchange-httpd_responses.c
+++ b/src/exchange/taler-exchange-httpd_responses.c
@@ -772,7 +772,8 @@ compile_reserve_history (const struct TALER_EXCHANGEDB_ReserveHistory *rh,
json_pack ("{s:s, s:O, s:O, s:o}",
"type", "DEPOSIT",
"sender_account_details", pos->details.bank->sender_account_details,
- "transfer_details", pos->details.bank->transfer_details,
+ "wire_reference", GNUNET_JSON_from_data (pos->details.bank->wire_reference,
+ pos->details.bank->wire_reference_size),
"amount", TALER_JSON_from_amount (&pos->details.bank->amount))));
break;
case TALER_EXCHANGEDB_RO_WITHDRAW_COIN:
diff --git a/src/exchange/taler-exchange-wirewatch.c b/src/exchange/taler-exchange-wirewatch.c
index 918eb597a..6daf5caca 100644
--- a/src/exchange/taler-exchange-wirewatch.c
+++ b/src/exchange/taler-exchange-wirewatch.c
@@ -238,7 +238,6 @@ history_cb (void *cls,
NULL);
return GNUNET_OK; /* will be ignored anyway */
}
- // FIXME: create json!
ret = db_plugin->reserves_in_insert (db_plugin->cls,
session,
&details->reserve_pub,
@@ -246,8 +245,7 @@ history_cb (void *cls,
details->execution_date,
details->account_details,
row_off,
- row_off_size,
- NULL /* FIXME */);
+ row_off_size);
if (GNUNET_OK != ret)
{
GNUNET_break (0);