aboutsummaryrefslogtreecommitdiff
path: root/src/exchange-lib
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-12-18 16:09:17 +0100
committerMarcello Stanisci <stanisci.m@gmail.com>2018-12-18 16:09:17 +0100
commitc38f521dd8342a609a11daa8b5d3916cb517efdd (patch)
tree3c2f9091ea9ef790bc45d5feceebc09822743226 /src/exchange-lib
parentbb45ee0e8ec534e391ea5b8cf21bfe4d153a2f58 (diff)
/deposit: #5284.
Diffstat (limited to 'src/exchange-lib')
-rw-r--r--src/exchange-lib/test_exchange_api_new.c26
-rw-r--r--src/exchange-lib/test_exchange_api_twisted.c3
-rw-r--r--src/exchange-lib/testing_api_cmd_deposit.c11
3 files changed, 13 insertions, 27 deletions
diff --git a/src/exchange-lib/test_exchange_api_new.c b/src/exchange-lib/test_exchange_api_new.c
index b061d86c0..b7bce47b1 100644
--- a/src/exchange-lib/test_exchange_api_new.c
+++ b/src/exchange-lib/test_exchange_api_new.c
@@ -217,7 +217,7 @@ run (void *cls,
* Spend the coin.
*/
TALER_TESTING_cmd_deposit
- ("deposit-simple", is->exchange, "withdraw-coin-1", 0,
+ ("deposit-simple", "withdraw-coin-1", 0,
TALER_TESTING_make_wire_details (42,
fakebank_url),
"{\"items\":[{\"name\":\"ice cream\",\"value\":1}]}",
@@ -236,7 +236,7 @@ run (void *cls,
* Try to double spend using different wire details.
*/
TALER_TESTING_cmd_deposit
- ("deposit-double-1", is->exchange, "withdraw-coin-1", 0,
+ ("deposit-double-1", "withdraw-coin-1", 0,
TALER_TESTING_make_wire_details (43,
fakebank_url),
"{\"items\":[{\"name\":\"ice cream\",\"value\":1}]}",
@@ -252,7 +252,7 @@ run (void *cls,
* how can a different id be generated?
*/
TALER_TESTING_cmd_deposit
- ("deposit-double-1", is->exchange, "withdraw-coin-1", 0,
+ ("deposit-double-1", "withdraw-coin-1", 0,
TALER_TESTING_make_wire_details (43,
fakebank_url),
"{\"items\":[{\"name\":\"ice cream\",\"value\":1}]}",
@@ -262,7 +262,7 @@ run (void *cls,
* Try to double spend with different proposal.
*/
TALER_TESTING_cmd_deposit
- ("deposit-double-2", is->exchange, "withdraw-coin-1", 0,
+ ("deposit-double-2", "withdraw-coin-1", 0,
TALER_TESTING_make_wire_details (43,
fakebank_url),
"{\"items\":[{\"name\":\"ice cream\",\"value\":2}]}",
@@ -303,7 +303,7 @@ run (void *cls,
* deposit fee)
*/
TALER_TESTING_cmd_deposit
- ("refresh-deposit-partial", is->exchange,
+ ("refresh-deposit-partial",
"refresh-withdraw-coin-1", 0,
TALER_TESTING_make_wire_details (42,
fakebank_url),
@@ -343,7 +343,7 @@ run (void *cls,
* Try to spend a refreshed EUR:1 coin
*/
TALER_TESTING_cmd_deposit
- ("refresh-deposit-refreshed-1a", is->exchange,
+ ("refresh-deposit-refreshed-1a",
"refresh-reveal-1-idempotency", 0,
TALER_TESTING_make_wire_details (42,
fakebank_url),
@@ -355,7 +355,7 @@ run (void *cls,
* Try to spend a refreshed EUR:0.1 coin
*/
TALER_TESTING_cmd_deposit
- ("refresh-deposit-refreshed-1b", is->exchange,
+ ("refresh-deposit-refreshed-1b",
"refresh-reveal-1", 3,
TALER_TESTING_make_wire_details (43,
fakebank_url),
@@ -494,7 +494,6 @@ run (void *cls,
TALER_TESTING_cmd_deposit
("deposit-unaggregated",
- is->exchange,
"withdraw-coin-unaggregated",
0,
TALER_TESTING_make_wire_details
@@ -542,7 +541,7 @@ run (void *cls,
* receive EUR:4.99 due to 1 ct deposit fee)
*/
TALER_TESTING_cmd_deposit
- ("deposit-refund-1", is->exchange, "withdraw-coin-r1", 0,
+ ("deposit-refund-1", "withdraw-coin-r1", 0,
TALER_TESTING_make_wire_details (42,
fakebank_url),
"{\"items\":[{\"name\":\"ice cream\","
@@ -589,7 +588,7 @@ run (void *cls,
* due to refund) (merchant would receive EUR:4.98 due to
* 1 ct deposit fee) */
TALER_TESTING_cmd_deposit
- ("deposit-refund-2", is->exchange, "withdraw-coin-r1", 0,
+ ("deposit-refund-2", "withdraw-coin-r1", 0,
TALER_TESTING_make_wire_details (42,
fakebank_url),
"{\"items\":[{\"name\":\"more ice cream\","
@@ -641,7 +640,7 @@ run (void *cls,
TALER_TESTING_cmd_deposit
- ("deposit-refund-1b", is->exchange, "withdraw-coin-rb", 0,
+ ("deposit-refund-1b", "withdraw-coin-rb", 0,
TALER_TESTING_make_wire_details (42,
fakebank_url),
"{\"items\":[{\"name\":\"ice cream\","
@@ -804,7 +803,7 @@ run (void *cls,
MHD_HTTP_OK),
TALER_TESTING_cmd_deposit
- ("payback-deposit-partial", is->exchange,
+ ("payback-deposit-partial",
"payback-withdraw-coin-2a", 0,
TALER_TESTING_make_wire_details (42,
fakebank_url),
@@ -825,7 +824,7 @@ run (void *cls,
"EUR:0.5"),
TALER_TESTING_cmd_deposit
- ("payback-deposit-revoked", is->exchange,
+ ("payback-deposit-revoked",
"payback-withdraw-coin-2b", 0,
TALER_TESTING_make_wire_details (42,
fakebank_url),
@@ -840,7 +839,6 @@ run (void *cls,
* 404 on the DK! */
TALER_TESTING_cmd_deposit
("payback-deposit-partial-after-payback",
- is->exchange,
"payback-withdraw-coin-2a",
0,
TALER_TESTING_make_wire_details
diff --git a/src/exchange-lib/test_exchange_api_twisted.c b/src/exchange-lib/test_exchange_api_twisted.c
index 9e52c9ea7..cc5377c72 100644
--- a/src/exchange-lib/test_exchange_api_twisted.c
+++ b/src/exchange-lib/test_exchange_api_twisted.c
@@ -174,7 +174,6 @@ run (void *cls,
TALER_TESTING_cmd_deposit
("refresh-deposit-partial",
- is->exchange,
"refresh-withdraw-coin",
0,
TALER_TESTING_make_wire_details
@@ -236,7 +235,6 @@ run (void *cls,
TALER_TESTING_cmd_deposit
("deposit-refund-1",
- is->exchange,
"withdraw-coin-r1",
0,
TALER_TESTING_make_wire_details
@@ -280,7 +278,6 @@ run (void *cls,
TALER_TESTING_cmd_deposit
("deposit-refund-to-fail",
- is->exchange,
"withdraw-coin-r1",
0, /* coin index. */
TALER_TESTING_make_wire_details
diff --git a/src/exchange-lib/testing_api_cmd_deposit.c b/src/exchange-lib/testing_api_cmd_deposit.c
index 18d409e23..d0cfd62da 100644
--- a/src/exchange-lib/testing_api_cmd_deposit.c
+++ b/src/exchange-lib/testing_api_cmd_deposit.c
@@ -88,11 +88,6 @@ struct DepositState
struct TALER_TESTING_Interpreter *is;
/**
- * Exchange connection.
- */
- struct TALER_EXCHANGE_Handle *exchange;
-
- /**
* Task scheduled to try later.
*/
struct GNUNET_SCHEDULER_Task *retry_task;
@@ -129,7 +124,6 @@ struct DepositState
* deposit confirmation.
*/
struct TALER_ExchangeSignatureP exchange_sig;
-
};
@@ -363,7 +357,7 @@ deposit_run (void *cls,
&coin_sig.eddsa_signature));
}
ds->dh = TALER_EXCHANGE_deposit
- (ds->exchange,
+ (is->exchange,
&amount,
wire_deadline,
ds->wire_details,
@@ -496,7 +490,6 @@ deposit_traits (void *cls,
* Create a "deposit" command.
*
* @param label command label.
- * @param exchange exchange connection.
* @param coin_reference reference to any operation that can
* provide a coin.
* @param coin_index if @a withdraw_reference offers an array of
@@ -518,7 +511,6 @@ deposit_traits (void *cls,
struct TALER_TESTING_Command
TALER_TESTING_cmd_deposit
(const char *label,
- struct TALER_EXCHANGE_Handle *exchange,
const char *coin_reference,
unsigned int coin_index,
json_t *wire_details,
@@ -531,7 +523,6 @@ TALER_TESTING_cmd_deposit
struct DepositState *ds;
ds = GNUNET_new (struct DepositState);
- ds->exchange = exchange;
ds->coin_reference = coin_reference;
ds->coin_index = coin_index;
ds->wire_details = wire_details;