get first p2p test to pass
This commit is contained in:
parent
aedd2014ec
commit
b671d6b25d
@ -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))
|
||||
{
|
||||
|
@ -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)))
|
||||
{
|
||||
|
@ -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 ()
|
||||
|
Loading…
Reference in New Issue
Block a user