From 7fe8d89d75eed6495b7e24c98cc8dc92a93d15a2 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 29 Jun 2022 19:30:12 +0200 Subject: -update deposit API in preparation for batch deposits --- src/testing/testing_api_cmd_deposit.c | 45 +++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 18 deletions(-) (limited to 'src/testing') diff --git a/src/testing/testing_api_cmd_deposit.c b/src/testing/testing_api_cmd_deposit.c index 4edc6f217..deaff4dbc 100644 --- a/src/testing/testing_api_cmd_deposit.c +++ b/src/testing/testing_api_cmd_deposit.c @@ -454,24 +454,33 @@ deposit_run (void *cls, &coin_sig); } GNUNET_assert (NULL == ds->dh); - ds->dh = TALER_EXCHANGE_deposit (is->exchange, - &ds->amount, - ds->wire_deadline, - payto_uri, - &wire_salt, - &h_contract_terms, - &h_age_commitment, - NULL, /* FIXME: add hash of extensions */ - &coin_pub, - denom_pub_sig, - &denom_pub->key, - ds->wallet_timestamp, - &merchant_pub, - ds->refund_deadline, - &coin_sig, - &deposit_cb, - ds, - &ec); + { + struct TALER_EXCHANGE_CoinDepositDetail cdd = { + .amount = ds->amount, + .h_age_commitment = h_age_commitment, + .coin_pub = coin_pub, + .coin_sig = coin_sig, + .denom_sig = *denom_pub_sig, + .h_denom_pub = denom_pub->h_key + }; + struct TALER_EXCHANGE_DepositContractDetail dcd = { + .wire_deadline = ds->wire_deadline, + .merchant_payto_uri = payto_uri, + .wire_salt = wire_salt, + .h_contract_terms = h_contract_terms, + .extension_details = NULL /* FIXME-OEC */, + .timestamp = ds->wallet_timestamp, + .merchant_pub = merchant_pub, + .refund_deadline = ds->refund_deadline + }; + + ds->dh = TALER_EXCHANGE_deposit (is->exchange, + &dcd, + &cdd, + &deposit_cb, + ds, + &ec); + } if (NULL == ds->dh) { GNUNET_break (0); -- cgit v1.2.3