summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-03-27 20:01:31 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-03-27 20:01:31 +0530
commit1a15cd29e87f27a29c69f385725baf33022a6e60 (patch)
tree878d171f23f1cfc10dd8bb111177305b611893bd /src
parent20933b3950d56b0e04f2fcdea16ac37fd83b767d (diff)
downloadexchange-1a15cd29e87f27a29c69f385725baf33022a6e60.tar.gz
exchange-1a15cd29e87f27a29c69f385725baf33022a6e60.tar.bz2
exchange-1a15cd29e87f27a29c69f385725baf33022a6e60.zip
deposit command: create merchant key in a more appropriate place
Diffstat (limited to 'src')
-rw-r--r--src/testing/testing_api_cmd_deposit.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/testing/testing_api_cmd_deposit.c b/src/testing/testing_api_cmd_deposit.c
index 27cbcabc3..ba4dc3075 100644
--- a/src/testing/testing_api_cmd_deposit.c
+++ b/src/testing/testing_api_cmd_deposit.c
@@ -277,7 +277,6 @@ deposit_run (void *cls,
const struct TALER_DenominationSignature *denom_pub_sig;
struct TALER_CoinSpendSignatureP coin_sig;
struct GNUNET_TIME_Absolute wire_deadline;
- struct GNUNET_CRYPTO_EddsaPrivateKey *merchant_priv;
struct TALER_MerchantPublicKeyP merchant_pub;
struct GNUNET_HashCode h_contract_terms;
@@ -308,12 +307,6 @@ deposit_run (void *cls,
ds->merchant_priv = ods->merchant_priv;
ds->command_initialized = GNUNET_YES;
}
- else
- {
- merchant_priv = GNUNET_CRYPTO_eddsa_key_create ();
- ds->merchant_priv.eddsa_priv = *merchant_priv;
- GNUNET_free (merchant_priv);
- }
GNUNET_assert (ds->coin_reference);
coin_cmd = TALER_TESTING_interpreter_lookup_command
(is,
@@ -561,6 +554,7 @@ TALER_TESTING_cmd_deposit (const char *label,
{
struct DepositState *ds;
json_t *wire_details;
+ struct GNUNET_CRYPTO_EddsaPrivateKey *merchant_priv;
wire_details = TALER_TESTING_make_wire_details (target_account_payto);
ds = GNUNET_new (struct DepositState);
@@ -570,6 +564,9 @@ TALER_TESTING_cmd_deposit (const char *label,
ds->contract_terms = json_loads (contract_terms,
JSON_REJECT_DUPLICATES,
NULL);
+ merchant_priv = GNUNET_CRYPTO_eddsa_key_create ();
+ ds->merchant_priv.eddsa_priv = *merchant_priv;
+ GNUNET_free (merchant_priv);
if (NULL == ds->contract_terms)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,