get first p2p test to pass

This commit is contained in:
Christian Grothoff 2022-04-24 16:02:34 +02:00
parent aedd2014ec
commit b671d6b25d
No known key found for this signature in database
GPG Key ID: 939E6BE1E29FC3CC
3 changed files with 9 additions and 6 deletions

View File

@ -492,7 +492,7 @@ parse_coin (struct MHD_Connection *connection,
if (GNUNET_OK != if (GNUNET_OK !=
TALER_wallet_purse_deposit_verify (TEH_base_url, TALER_wallet_purse_deposit_verify (TEH_base_url,
pcc->purse_pub, pcc->purse_pub,
&pcc->amount, &coin->amount,
&coin->cpi.coin_pub, &coin->cpi.coin_pub,
&coin->coin_sig)) &coin->coin_sig))
{ {

View File

@ -134,7 +134,7 @@ reply_merge_success (struct MHD_Connection *connection,
enum TALER_ErrorCode ec; enum TALER_ErrorCode ec;
struct TALER_Amount merge_amount; struct TALER_Amount merge_amount;
if (0 <= if (0 <
TALER_amount_cmp (&pcc->balance, TALER_amount_cmp (&pcc->balance,
&pcc->target_amount)) &pcc->target_amount))
{ {
@ -144,8 +144,9 @@ reply_merge_success (struct MHD_Connection *connection,
TALER_JSON_pack_amount ("balance", TALER_JSON_pack_amount ("balance",
&pcc->balance)); &pcc->balance));
} }
if (0 == strcmp (pcc->provider_url, if ( (NULL == pcc->provider_url) ||
TEH_base_url)) (0 == strcmp (pcc->provider_url,
TEH_base_url)) )
{ {
/* wad fee is always zero if we stay at our own exchange */ /* wad fee is always zero if we stay at our own exchange */
merge_amount = pcc->target_amount; merge_amount = pcc->target_amount;
@ -175,7 +176,9 @@ reply_merge_success (struct MHD_Connection *connection,
pcc->purse_pub, pcc->purse_pub,
&pcc->h_contract_terms, &pcc->h_contract_terms,
&pcc->reserve_pub, &pcc->reserve_pub,
pcc->provider_url, (NULL != pcc->provider_url)
? pcc->provider_url
: TEH_base_url,
&pub, &pub,
&sig))) &sig)))
{ {

View File

@ -142,7 +142,7 @@ handle_purse_merge_finished (void *cls,
&exchange_pub), &exchange_pub),
GNUNET_JSON_spec_timestamp ("exchange_timestamp", GNUNET_JSON_spec_timestamp ("exchange_timestamp",
&etime), &etime),
TALER_JSON_spec_amount ("total_deposited", TALER_JSON_spec_amount ("merge_amount",
pch->purse_value_after_fees.currency, pch->purse_value_after_fees.currency,
&total_deposited), &total_deposited),
GNUNET_JSON_spec_end () GNUNET_JSON_spec_end ()