diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-06-27 18:30:25 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-06-27 18:30:25 +0200 |
commit | d0d71dab8177cdac8a6e8c4f8a846053d8b738a7 (patch) | |
tree | edfe078ac9b35f1e788c8b525447a28e8e5afd4d | |
parent | 00636804457fa363ac3c180a33028809bbffd823 (diff) | |
download | exchange-d0d71dab8177cdac8a6e8c4f8a846053d8b738a7.tar.xz |
fix #6236
-rw-r--r-- | src/include/taler_testing_lib.h | 10 | ||||
-rw-r--r-- | src/testing/testing_api_cmd_deposit.c | 14 |
2 files changed, 22 insertions, 2 deletions
diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h index bfb86be1b..ae0bcce77 100644 --- a/src/include/taler_testing_lib.h +++ b/src/include/taler_testing_lib.h @@ -1332,6 +1332,16 @@ TALER_TESTING_cmd_status (const char *label, unsigned int expected_response_code); /** + * Index of the deposit value trait of a deposit command. + */ +#define TALER_TESTING_CMD_DEPOSIT_TRAIT_IDX_DEPOSIT_VALUE 0 + +/** + * Index of the deposit fee trait of a deposit command. + */ +#define TALER_TESTING_CMD_DEPOSIT_TRAIT_IDX_DEPOSIT_FEE 1 + +/** * Create a "deposit" command. * * @param label command label. diff --git a/src/testing/testing_api_cmd_deposit.c b/src/testing/testing_api_cmd_deposit.c index 049f36f25..f302a218b 100644 --- a/src/testing/testing_api_cmd_deposit.c +++ b/src/testing/testing_api_cmd_deposit.c @@ -53,6 +53,11 @@ struct DepositState struct TALER_Amount amount; /** + * Deposit fee. + */ + struct TALER_Amount deposit_fee; + + /** * Reference to any command that is able to provide a coin. */ const char *coin_reference; @@ -374,6 +379,7 @@ deposit_run (void *cls, TALER_TESTING_interpreter_fail (is); return; } + ds->deposit_fee = denom_pub->fee_deposit; GNUNET_CRYPTO_eddsa_key_get_public (&coin_priv->eddsa_priv, &coin_pub.eddsa_pub); @@ -541,8 +547,12 @@ deposit_traits (void *cls, ds->contract_terms), TALER_TESTING_make_trait_merchant_priv (0, &ds->merchant_priv), - TALER_TESTING_make_trait_amount_obj (0, - &ds->amount), + TALER_TESTING_make_trait_amount_obj ( + TALER_TESTING_CMD_DEPOSIT_TRAIT_IDX_DEPOSIT_VALUE, + &ds->amount), + TALER_TESTING_make_trait_amount_obj ( + TALER_TESTING_CMD_DEPOSIT_TRAIT_IDX_DEPOSIT_FEE, + &ds->deposit_fee), TALER_TESTING_make_trait_absolute_time (0, &ds->exchange_timestamp), TALER_TESTING_trait_end () |