aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/exchange/taler-exchange-httpd_purses_deposit.c1
-rw-r--r--src/lib/exchange_api_purse_deposit.c16
-rw-r--r--src/testing/Makefile.am2
-rw-r--r--src/util/crypto_contract.c6
4 files changed, 10 insertions, 15 deletions
diff --git a/src/exchange/taler-exchange-httpd_purses_deposit.c b/src/exchange/taler-exchange-httpd_purses_deposit.c
index e2a5d34f4..d29487af5 100644
--- a/src/exchange/taler-exchange-httpd_purses_deposit.c
+++ b/src/exchange/taler-exchange-httpd_purses_deposit.c
@@ -325,7 +325,6 @@ parse_coin (struct MHD_Connection *connection,
if (GNUNET_OK != res)
return res;
}
-
if (GNUNET_OK !=
TALER_wallet_purse_deposit_verify (TEH_base_url,
pcc->purse_pub,
diff --git a/src/lib/exchange_api_purse_deposit.c b/src/lib/exchange_api_purse_deposit.c
index 540be0e2c..dfe9a6ecf 100644
--- a/src/lib/exchange_api_purse_deposit.c
+++ b/src/lib/exchange_api_purse_deposit.c
@@ -71,11 +71,6 @@ struct TALER_EXCHANGE_PurseDepositHandle
void *cb_cls;
/**
- * Expected value in the purse after fees.
- */
- struct TALER_Amount purse_value_after_fees;
-
- /**
* Public key of the purse.
*/
struct TALER_PurseContractPublicKeyP purse_pub;
@@ -102,8 +97,10 @@ handle_purse_deposit_finished (void *cls,
.hr.reply = j,
.hr.http_status = (unsigned int) response_code
};
+ const struct TALER_EXCHANGE_Keys *keys;
pch->job = NULL;
+ keys = TALER_EXCHANGE_get_keys (pch->exchange);
switch (response_code)
{
case 0:
@@ -124,7 +121,7 @@ handle_purse_deposit_finished (void *cls,
GNUNET_JSON_spec_timestamp ("exchange_timestamp",
&etime),
TALER_JSON_spec_amount ("total_deposited",
- pch->purse_value_after_fees.currency,
+ keys->currency,
&total_deposited),
GNUNET_JSON_spec_end ()
};
@@ -242,6 +239,11 @@ TALER_EXCHANGE_purse_deposit (
char *url;
char arg_str[sizeof (pch->purse_pub) * 2 + 32];
+ if (0 == num_deposits)
+ {
+ GNUNET_break (0);
+ return NULL;
+ }
GNUNET_assert (GNUNET_YES ==
TEAH_handle_is_ready (exchange));
pch = GNUNET_new (struct TALER_EXCHANGE_PurseDepositHandle);
@@ -301,9 +303,9 @@ TALER_EXCHANGE_purse_deposit (
GNUNET_free (pch);
return NULL;
}
+#endif
GNUNET_CRYPTO_eddsa_key_get_public (&deposit->coin_priv.eddsa_priv,
&coin_pub.eddsa_pub);
-#endif
TALER_wallet_purse_deposit_sign (
url,
&pch->purse_pub,
diff --git a/src/testing/Makefile.am b/src/testing/Makefile.am
index b985dd28c..56b009af5 100644
--- a/src/testing/Makefile.am
+++ b/src/testing/Makefile.am
@@ -286,7 +286,7 @@ test_exchange_api_rsa_LDADD = \
$(XLIB)
test_exchange_p2p_cs_SOURCES = \
- test_exchange_api.c
+ test_exchange_p2p.c
test_exchange_p2p_cs_LDADD = \
libtalertesting.la \
$(top_builddir)/src/lib/libtalerexchange.la \
diff --git a/src/util/crypto_contract.c b/src/util/crypto_contract.c
index bcfe95239..fe6b1e6af 100644
--- a/src/util/crypto_contract.c
+++ b/src/util/crypto_contract.c
@@ -278,9 +278,6 @@ TALER_CRYPTO_contract_encrypt_for_merge (
GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE,
&nonce,
sizeof (nonce));
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Encrypting with key %s\n",
- TALER_B2S (&key));
contract_encrypt (&nonce,
&key,
sizeof (key),
@@ -318,9 +315,6 @@ TALER_CRYPTO_contract_decrypt_for_merge (
GNUNET_break (0);
return NULL;
}
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Decrypting with key %s\n",
- TALER_B2S (&key));
if (GNUNET_OK !=
contract_decrypt (&key,
sizeof (key),