This commit is contained in:
Christian Grothoff 2020-06-27 18:30:25 +02:00
parent 0063680445
commit d0d71dab81
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
2 changed files with 22 additions and 2 deletions

View File

@ -1331,6 +1331,16 @@ TALER_TESTING_cmd_status (const char *label,
const char *expected_balance, const char *expected_balance,
unsigned int expected_response_code); 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. * Create a "deposit" command.
* *

View File

@ -52,6 +52,11 @@ struct DepositState
*/ */
struct TALER_Amount amount; struct TALER_Amount amount;
/**
* Deposit fee.
*/
struct TALER_Amount deposit_fee;
/** /**
* Reference to any command that is able to provide a coin. * Reference to any command that is able to provide a coin.
*/ */
@ -374,6 +379,7 @@ deposit_run (void *cls,
TALER_TESTING_interpreter_fail (is); TALER_TESTING_interpreter_fail (is);
return; return;
} }
ds->deposit_fee = denom_pub->fee_deposit;
GNUNET_CRYPTO_eddsa_key_get_public (&coin_priv->eddsa_priv, GNUNET_CRYPTO_eddsa_key_get_public (&coin_priv->eddsa_priv,
&coin_pub.eddsa_pub); &coin_pub.eddsa_pub);
@ -541,8 +547,12 @@ deposit_traits (void *cls,
ds->contract_terms), ds->contract_terms),
TALER_TESTING_make_trait_merchant_priv (0, TALER_TESTING_make_trait_merchant_priv (0,
&ds->merchant_priv), &ds->merchant_priv),
TALER_TESTING_make_trait_amount_obj (0, TALER_TESTING_make_trait_amount_obj (
TALER_TESTING_CMD_DEPOSIT_TRAIT_IDX_DEPOSIT_VALUE,
&ds->amount), &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, TALER_TESTING_make_trait_absolute_time (0,
&ds->exchange_timestamp), &ds->exchange_timestamp),
TALER_TESTING_trait_end () TALER_TESTING_trait_end ()