diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-04-30 16:21:07 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-05-01 22:34:35 +0200 |
commit | 75f75c4a51c4700da9bde18cc9a9b5d9df1e8457 (patch) | |
tree | 08fb514c3be71e564373c5fde7209ec0084b97fc /src/testing/testing_api_cmd_wire_add.c | |
parent | 5ee567d1bacf1422745bb0867a1022fd695bc5dc (diff) | |
download | exchange-75f75c4a51c4700da9bde18cc9a9b5d9df1e8457.tar.xz |
breaking protocol changes towards fixing #7810 (incomplete, taler-exchange-offline still unfinished)
Diffstat (limited to 'src/testing/testing_api_cmd_wire_add.c')
-rw-r--r-- | src/testing/testing_api_cmd_wire_add.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/src/testing/testing_api_cmd_wire_add.c b/src/testing/testing_api_cmd_wire_add.c index c07e9bba6..c36f03b15 100644 --- a/src/testing/testing_api_cmd_wire_add.c +++ b/src/testing/testing_api_cmd_wire_add.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2020 Taler Systems SA + Copyright (C) 2020-2023 Taler Systems SA TALER is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -67,13 +67,14 @@ struct WireAddState * if the response code is acceptable. * * @param cls closure. - * @param hr HTTP response details + * @param wer response details */ static void wire_add_cb (void *cls, - const struct TALER_EXCHANGE_HttpResponse *hr) + const struct TALER_EXCHANGE_ManagementWireEnableResponse *wer) { struct WireAddState *ds = cls; + const struct TALER_EXCHANGE_HttpResponse *hr = &wer->hr; ds->dh = NULL; if (ds->expected_response_code != hr->http_status) @@ -110,10 +111,14 @@ wire_add_run (void *cls, struct TALER_MasterSignatureP master_sig1; struct TALER_MasterSignatureP master_sig2; struct GNUNET_TIME_Timestamp now; + json_t *credit_rest; + json_t *debit_rest; (void) cmd; now = GNUNET_TIME_timestamp_get (); ds->is = is; + debit_rest = json_array (); + credit_rest = json_array (); if (ds->bad_sig) { memset (&master_sig1, @@ -126,10 +131,16 @@ wire_add_run (void *cls, else { TALER_exchange_offline_wire_add_sign (ds->payto_uri, + NULL, + debit_rest, + credit_rest, now, &is->master_priv, &master_sig1); TALER_exchange_wire_signature_make (ds->payto_uri, + NULL, + debit_rest, + credit_rest, &is->master_priv, &master_sig2); } @@ -137,11 +148,16 @@ wire_add_run (void *cls, is->ctx, is->exchange_url, ds->payto_uri, + NULL, + debit_rest, + credit_rest, now, &master_sig1, &master_sig2, &wire_add_cb, ds); + json_decref (debit_rest); + json_decref (credit_rest); if (NULL == ds->dh) { GNUNET_break (0); |