From 421129a32ed88fee49108c76e67c16b60f95116b Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 25 Jun 2023 19:10:26 +0200 Subject: next round of exchange API atomization --- src/testing/testing_api_cmd_refund.c | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) (limited to 'src/testing/testing_api_cmd_refund.c') diff --git a/src/testing/testing_api_cmd_refund.c b/src/testing/testing_api_cmd_refund.c index a3ebd2e85..b8ce85f96 100644 --- a/src/testing/testing_api_cmd_refund.c +++ b/src/testing/testing_api_cmd_refund.c @@ -53,11 +53,6 @@ struct RefundState */ uint64_t refund_transaction_id; - /** - * Connection to the exchange. - */ - struct TALER_EXCHANGE_Handle *exchange; - /** * Handle to the refund operation. */ @@ -116,9 +111,6 @@ refund_run (void *cls, const struct TALER_MerchantPrivateKeyP *merchant_priv; const struct TALER_TESTING_Command *coin_cmd; - rs->exchange = TALER_TESTING_get_exchange (is); - if (NULL == rs->exchange) - return; rs->is = is; if (GNUNET_OK != TALER_string_to_amount (rs->refund_amount, @@ -172,14 +164,17 @@ refund_run (void *cls, TALER_TESTING_interpreter_fail (is); return; } - rs->rh = TALER_EXCHANGE_refund (rs->exchange, - &refund_amount, - &h_contract_terms, - &coin, - rs->refund_transaction_id, - merchant_priv, - &refund_cb, - rs); + rs->rh = TALER_EXCHANGE_refund ( + TALER_TESTING_interpreter_get_context (is), + TALER_TESTING_get_exchange_url (is), + TALER_TESTING_get_keys (is), + &refund_amount, + &h_contract_terms, + &coin, + rs->refund_transaction_id, + merchant_priv, + &refund_cb, + rs); GNUNET_assert (NULL != rs->rh); } -- cgit v1.2.3