diff options
Diffstat (limited to 'src/bank-lib/bank_api_admin.c')
-rw-r--r-- | src/bank-lib/bank_api_admin.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/bank-lib/bank_api_admin.c b/src/bank-lib/bank_api_admin.c index bfcf16a23..907e15ea7 100644 --- a/src/bank-lib/bank_api_admin.c +++ b/src/bank-lib/bank_api_admin.c @@ -24,8 +24,9 @@ #include <jansson.h> #include <microhttpd.h> /* just for HTTP status codes */ #include <gnunet/gnunet_util_lib.h> +#include <gnunet/gnunet_json_lib.h> #include "taler_bank_service.h" -#include "bank_api_json.h" +#include "taler_json_lib.h" #include "bank_api_context.h" #include "taler_signatures.h" @@ -134,7 +135,8 @@ handle_admin_add_incoming_finished (void *cls, break; } aai->cb (aai->cb_cls, - response_code); + response_code, + json); json_decref (json); TALER_BANK_admin_add_incoming_cancel (aai); } @@ -150,7 +152,8 @@ handle_admin_add_incoming_finished (void *cls, * @param reserve_pub public key of the reserve * @param amount amount that was deposited * @param execution_date when did we receive the amount - * @param account_no account number (53 bits at most) + * @param debit_account_no account number to withdraw from (53 bits at most) + * @param credit_account_no account number to deposit into (53 bits at most) * @param res_cb the callback to call when the final result for this request is available * @param res_cb_cls closure for the above callback * @return NULL @@ -161,7 +164,8 @@ struct TALER_BANK_AdminAddIncomingHandle * TALER_BANK_admin_add_incoming (struct TALER_BANK_Context *bank, const struct TALER_WireTransferIdentifierRawP *wtid, const struct TALER_Amount *amount, - uint64_t account_no, + uint64_t debit_account_no, + uint64_t credit_account_no, TALER_BANK_AdminAddIncomingResultCallback res_cb, void *res_cb_cls) { @@ -169,12 +173,13 @@ TALER_BANK_admin_add_incoming (struct TALER_BANK_Context *bank, json_t *admin_obj; CURL *eh; - admin_obj = json_pack ("{s:o, s:o," /* reserve_pub/amount */ - " s:I}", /* execution_Date/wire */ - "wtid", TALER_json_from_data (wtid, - sizeof (*wtid)), - "amount", TALER_json_from_amount (amount), - "account", (json_int_t) account_no); + admin_obj = json_pack ("{s:o, s:o," + " s:I, s:I}", + "wtid", GNUNET_JSON_from_data (wtid, + sizeof (*wtid)), /* #4340 */ + "amount", TALER_JSON_from_amount (amount), + "debit_account", (json_int_t) debit_account_no, + "credit_account", (json_int_t) credit_account_no); aai = GNUNET_new (struct TALER_BANK_AdminAddIncomingHandle); aai->bank = bank; aai->cb = res_cb; |