aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/exchange/taler-exchange-httpd_purses_create.c2
-rw-r--r--src/exchange/taler-exchange-httpd_purses_merge.c11
-rw-r--r--src/lib/exchange_api_purse_merge.c2
3 files changed, 9 insertions, 6 deletions
diff --git a/src/exchange/taler-exchange-httpd_purses_create.c b/src/exchange/taler-exchange-httpd_purses_create.c
index ef1189530..acd9bcc55 100644
--- a/src/exchange/taler-exchange-httpd_purses_create.c
+++ b/src/exchange/taler-exchange-httpd_purses_create.c
@@ -492,7 +492,7 @@ parse_coin (struct MHD_Connection *connection,
if (GNUNET_OK !=
TALER_wallet_purse_deposit_verify (TEH_base_url,
pcc->purse_pub,
- &pcc->amount,
+ &coin->amount,
&coin->cpi.coin_pub,
&coin->coin_sig))
{
diff --git a/src/exchange/taler-exchange-httpd_purses_merge.c b/src/exchange/taler-exchange-httpd_purses_merge.c
index ee8a73756..e79c41d85 100644
--- a/src/exchange/taler-exchange-httpd_purses_merge.c
+++ b/src/exchange/taler-exchange-httpd_purses_merge.c
@@ -134,7 +134,7 @@ reply_merge_success (struct MHD_Connection *connection,
enum TALER_ErrorCode ec;
struct TALER_Amount merge_amount;
- if (0 <=
+ if (0 <
TALER_amount_cmp (&pcc->balance,
&pcc->target_amount))
{
@@ -144,8 +144,9 @@ reply_merge_success (struct MHD_Connection *connection,
TALER_JSON_pack_amount ("balance",
&pcc->balance));
}
- if (0 == strcmp (pcc->provider_url,
- TEH_base_url))
+ if ( (NULL == pcc->provider_url) ||
+ (0 == strcmp (pcc->provider_url,
+ TEH_base_url)) )
{
/* wad fee is always zero if we stay at our own exchange */
merge_amount = pcc->target_amount;
@@ -175,7 +176,9 @@ reply_merge_success (struct MHD_Connection *connection,
pcc->purse_pub,
&pcc->h_contract_terms,
&pcc->reserve_pub,
- pcc->provider_url,
+ (NULL != pcc->provider_url)
+ ? pcc->provider_url
+ : TEH_base_url,
&pub,
&sig)))
{
diff --git a/src/lib/exchange_api_purse_merge.c b/src/lib/exchange_api_purse_merge.c
index 2dc9e4ca0..d30d5da26 100644
--- a/src/lib/exchange_api_purse_merge.c
+++ b/src/lib/exchange_api_purse_merge.c
@@ -142,7 +142,7 @@ handle_purse_merge_finished (void *cls,
&exchange_pub),
GNUNET_JSON_spec_timestamp ("exchange_timestamp",
&etime),
- TALER_JSON_spec_amount ("total_deposited",
+ TALER_JSON_spec_amount ("merge_amount",
pch->purse_value_after_fees.currency,
&total_deposited),
GNUNET_JSON_spec_end ()