aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_api_cmd_refund.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-06-25 19:10:26 +0200
committerChristian Grothoff <christian@grothoff.org>2023-06-25 19:10:26 +0200
commit421129a32ed88fee49108c76e67c16b60f95116b (patch)
tree48238febcdf91df64e1fe35ddaa5958c373ce372 /src/testing/testing_api_cmd_refund.c
parent75733ee00efc6d5342ed8b4fccd637efaebdce06 (diff)
downloadexchange-421129a32ed88fee49108c76e67c16b60f95116b.tar.xz
next round of exchange API atomization
Diffstat (limited to 'src/testing/testing_api_cmd_refund.c')
-rw-r--r--src/testing/testing_api_cmd_refund.c27
1 files changed, 11 insertions, 16 deletions
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
@@ -54,11 +54,6 @@ struct RefundState
uint64_t refund_transaction_id;
/**
- * Connection to the exchange.
- */
- struct TALER_EXCHANGE_Handle *exchange;
-
- /**
* Handle to the refund operation.
*/
struct TALER_EXCHANGE_RefundHandle *rh;
@@ -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);
}