summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-07-23 13:02:15 +0200
committerChristian Grothoff <christian@grothoff.org>2021-07-23 13:02:15 +0200
commit37eb7373adeaff6f2096b8810c7fe4ca0ced547a (patch)
treea3664c8d70daee100d0b89d685de7d8d5a0d6f22
parent8c9f0b724fbfbf2f5bd9d80c013943b2b1aac83f (diff)
downloadmerchant-37eb7373adeaff6f2096b8810c7fe4ca0ced547a.tar.gz
merchant-37eb7373adeaff6f2096b8810c7fe4ca0ced547a.tar.bz2
merchant-37eb7373adeaff6f2096b8810c7fe4ca0ced547a.zip
-rename TALER_amount_get_zero to TALER_amount_set_zero
m---------contrib/merchant-backoffice0
-rw-r--r--src/backend/taler-merchant-httpd_get-orders-ID.c2
-rw-r--r--src/backend/taler-merchant-httpd_post-orders-ID-pay.c8
-rw-r--r--src/backend/taler-merchant-httpd_post-orders-ID-refund.c2
-rw-r--r--src/backend/taler-merchant-httpd_post-tips-ID-pickup.c2
-rw-r--r--src/backend/taler-merchant-httpd_private-get-orders-ID.c10
-rw-r--r--src/backend/taler-merchant-httpd_private-get-orders.c2
-rw-r--r--src/backenddb/plugin_merchantdb_postgres.c4
-rw-r--r--src/backenddb/test_merchantdb.c6
-rw-r--r--src/testing/testing_api_cmd_merchant_get_order.c2
-rw-r--r--src/testing/testing_api_cmd_merchant_get_tip.c2
-rw-r--r--src/testing/testing_api_cmd_post_instances.c2
-rw-r--r--src/testing/testing_api_cmd_post_transfers.c6
-rw-r--r--src/testing/testing_api_cmd_tip_pickup.c2
-rw-r--r--src/testing/testing_api_cmd_wallet_post_orders_refund.c2
15 files changed, 26 insertions, 26 deletions
diff --git a/contrib/merchant-backoffice b/contrib/merchant-backoffice
-Subproject 26ab01cac7fd4c85ec83b6079c4aa2fb88b73f8
+Subproject fe987187e178816d42ed12178d430c8771cb5a7
diff --git a/src/backend/taler-merchant-httpd_get-orders-ID.c b/src/backend/taler-merchant-httpd_get-orders-ID.c
index ff2b3fa3..801d4bb1 100644
--- a/src/backend/taler-merchant-httpd_get-orders-ID.c
+++ b/src/backend/taler-merchant-httpd_get-orders-ID.c
@@ -1072,7 +1072,7 @@ TMH_get_orders_ID (const struct TMH_RequestHandler *rh,
/* At this point, we know the contract was paid. Let's check for
refunds. First, clear away refunds found from previous invocations. */
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TMH_currency,
+ TALER_amount_set_zero (TMH_currency,
&god->refund_amount));
qs = TMH_db->lookup_refunds_detailed (TMH_db->cls,
hc->instance->settings.id,
diff --git a/src/backend/taler-merchant-httpd_post-orders-ID-pay.c b/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
index 2efbade0..682900b4 100644
--- a/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
+++ b/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
@@ -1226,7 +1226,7 @@ check_payment_sufficient (struct PayContext *pc)
/* Wire fee threshold is still above the wire fee amount.
Customer is not going to contribute on this. */
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (total_wire_fee.currency,
+ TALER_amount_set_zero (total_wire_fee.currency,
&wire_fee_customer_contribution));
break;
default:
@@ -1362,13 +1362,13 @@ execute_pay_transaction (struct PayContext *pc)
(used in check_coin_paid(), check_coin_refunded()
and check_payment_sufficient()). */
GNUNET_break (GNUNET_OK ==
- TALER_amount_get_zero (pc->amount.currency,
+ TALER_amount_set_zero (pc->amount.currency,
&pc->total_paid));
GNUNET_break (GNUNET_OK ==
- TALER_amount_get_zero (pc->amount.currency,
+ TALER_amount_set_zero (pc->amount.currency,
&pc->total_fees_paid));
GNUNET_break (GNUNET_OK ==
- TALER_amount_get_zero (pc->amount.currency,
+ TALER_amount_set_zero (pc->amount.currency,
&pc->total_refunded));
for (unsigned int i = 0; i<pc->coins_cnt; i++)
pc->dc[i].found_in_db = false;
diff --git a/src/backend/taler-merchant-httpd_post-orders-ID-refund.c b/src/backend/taler-merchant-httpd_post-orders-ID-refund.c
index 8c445680..22c9f717 100644
--- a/src/backend/taler-merchant-httpd_post-orders-ID-refund.c
+++ b/src/backend/taler-merchant-httpd_post-orders-ID-refund.c
@@ -649,7 +649,7 @@ TMH_post_orders_ID_refund (const struct TMH_RequestHandler *rh,
}
{
- GNUNET_assert (GNUNET_OK == TALER_amount_get_zero (TMH_currency,
+ GNUNET_assert (GNUNET_OK == TALER_amount_set_zero (TMH_currency,
&prd->refund_amount));
qs = TMH_db->lookup_refunds_detailed (TMH_db->cls,
hc->instance->settings.id,
diff --git a/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c b/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c
index 03da7262..2bdef2bc 100644
--- a/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c
+++ b/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c
@@ -527,7 +527,7 @@ compute_total_requested (void *cls,
return;
}
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TMH_currency,
+ TALER_amount_set_zero (TMH_currency,
&pc->total_requested));
for (unsigned int i = 0; i<pc->planchets_length; i++)
{
diff --git a/src/backend/taler-merchant-httpd_private-get-orders-ID.c b/src/backend/taler-merchant-httpd_private-get-orders-ID.c
index 5d471aa4..ed276b42 100644
--- a/src/backend/taler-merchant-httpd_private-get-orders-ID.c
+++ b/src/backend/taler-merchant-httpd_private-get-orders-ID.c
@@ -1110,10 +1110,10 @@ TMH_private_get_orders_ID (const struct TMH_RequestHandler *rh,
/* suspend connection, wait for exchange to check wire transfer status there */
gorc->transfer_status_requested = false; /* only try ONCE */
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TMH_currency,
+ TALER_amount_set_zero (TMH_currency,
&gorc->deposits_total));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TMH_currency,
+ TALER_amount_set_zero (TMH_currency,
&gorc->deposit_fees_total));
TMH_db->lookup_deposits_by_order (TMH_db->cls,
gorc->order_serial,
@@ -1193,7 +1193,7 @@ TMH_private_get_orders_ID (const struct TMH_RequestHandler *rh,
/* Accumulate refunds, if any. */
{
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TMH_currency,
+ TALER_amount_set_zero (TMH_currency,
&gorc->refund_amount));
qs = TMH_db->lookup_refunds_detailed (TMH_db->cls,
hc->instance->settings.id,
@@ -1216,10 +1216,10 @@ TMH_private_get_orders_ID (const struct TMH_RequestHandler *rh,
char *order_status_url;
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TMH_currency,
+ TALER_amount_set_zero (TMH_currency,
&gorc->deposits_total));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TMH_currency,
+ TALER_amount_set_zero (TMH_currency,
&gorc->deposit_fees_total));
qs = TMH_db->lookup_transfer_details_by_order (TMH_db->cls,
gorc->order_serial,
diff --git a/src/backend/taler-merchant-httpd_private-get-orders.c b/src/backend/taler-merchant-httpd_private-get-orders.c
index 673728d6..e3df8309 100644
--- a/src/backend/taler-merchant-httpd_private-get-orders.c
+++ b/src/backend/taler-merchant-httpd_private-get-orders.c
@@ -340,7 +340,7 @@ add_order (void *cls,
struct TALER_Amount refund_amount;
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (TMH_currency,
+ TALER_amount_set_zero (TMH_currency,
&refund_amount));
qs = TMH_db->lookup_refunds_detailed (TMH_db->cls,
aos->instance_id,
diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c
index 50870fb5..46e5e376 100644
--- a/src/backenddb/plugin_merchantdb_postgres.c
+++ b/src/backenddb/plugin_merchantdb_postgres.c
@@ -2895,7 +2895,7 @@ process_deposits_for_refund_cb (void *cls,
now = GNUNET_TIME_absolute_get ();
(void) GNUNET_TIME_round_abs (&now);
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (ctx->refund->currency,
+ TALER_amount_set_zero (ctx->refund->currency,
&current_refund));
memset (rcd, 0, sizeof (rcd));
/* Pass 1: Collect amount of existing refunds into current_refund.
@@ -2934,7 +2934,7 @@ process_deposits_for_refund_cb (void *cls,
};
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (ctx->refund->currency,
+ TALER_amount_set_zero (ctx->refund->currency,
&ictx.refunded_amount));
ires = GNUNET_PQ_eval_prepared_multi_select (ctx->pg->conn,
"find_refunds_by_coin",
diff --git a/src/backenddb/test_merchantdb.c b/src/backenddb/test_merchantdb.c
index 593913cb..1e68bcae 100644
--- a/src/backenddb/test_merchantdb.c
+++ b/src/backenddb/test_merchantdb.c
@@ -3338,10 +3338,10 @@ make_transfer (const struct ExchangeSignkeyData *signkey,
transfer->data.details_length = 0;
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (deposits[0].amount_with_fee.currency,
+ TALER_amount_set_zero (deposits[0].amount_with_fee.currency,
&transfer->data.total_amount));
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (deposits[0].amount_with_fee.currency,
+ TALER_amount_set_zero (deposits[0].amount_with_fee.currency,
&transfer->deposit_fee));
for (unsigned int i = 0; i < deposits_length; ++i)
{
@@ -5392,7 +5392,7 @@ run_test_tips (struct TestTips_Closure *cls)
struct TALER_Amount zero;
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero ("EUR",
+ TALER_amount_set_zero ("EUR",
&zero));
TEST_RET_ON_FAIL (test_insert_instance (&cls->instance,
GNUNET_DB_STATUS_SUCCESS_ONE_RESULT));
diff --git a/src/testing/testing_api_cmd_merchant_get_order.c b/src/testing/testing_api_cmd_merchant_get_order.c
index ed8b966b..8862c3ec 100644
--- a/src/testing/testing_api_cmd_merchant_get_order.c
+++ b/src/testing/testing_api_cmd_merchant_get_order.c
@@ -373,7 +373,7 @@ merchant_get_order_cb (
}
if (0 < gos->refunds_length)
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (
+ TALER_amount_set_zero (
osr->details.paid.refund_amount.currency,
&refunded_total));
for (unsigned int i = 0; i < gos->refunds_length; ++i)
diff --git a/src/testing/testing_api_cmd_merchant_get_tip.c b/src/testing/testing_api_cmd_merchant_get_tip.c
index d2f0a1a5..7c3daac2 100644
--- a/src/testing/testing_api_cmd_merchant_get_tip.c
+++ b/src/testing/testing_api_cmd_merchant_get_tip.c
@@ -108,7 +108,7 @@ merchant_get_tip_cb (void *cls,
gts->tip_reference);
gts->tgh = NULL;
- GNUNET_assert (GNUNET_OK == TALER_amount_get_zero (total_picked_up->currency,
+ GNUNET_assert (GNUNET_OK == TALER_amount_set_zero (total_picked_up->currency,
&expected_total_picked_up));
if (gts->http_status != hr->http_status)
{
diff --git a/src/testing/testing_api_cmd_post_instances.c b/src/testing/testing_api_cmd_post_instances.c
index 8961d4e0..5b133ffd 100644
--- a/src/testing/testing_api_cmd_post_instances.c
+++ b/src/testing/testing_api_cmd_post_instances.c
@@ -356,7 +356,7 @@ TALER_TESTING_cmd_merchant_post_instances (const char *label,
const char *default_max_fee_s;
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (currency,
+ TALER_amount_set_zero (currency,
&default_max_fee));
default_max_fee.value = 1;
default_max_fee_s = TALER_amount2s (&default_max_fee);
diff --git a/src/testing/testing_api_cmd_post_transfers.c b/src/testing/testing_api_cmd_post_transfers.c
index 35c425a3..70d1884b 100644
--- a/src/testing/testing_api_cmd_post_transfers.c
+++ b/src/testing/testing_api_cmd_post_transfers.c
@@ -192,7 +192,7 @@ transfers_cb (void *cls,
TALER_TESTING_interpreter_fail (pts->is);
return;
}
- TALER_amount_get_zero (total.currency,
+ TALER_amount_set_zero (total.currency,
&total);
for (unsigned int i = 0; i<details_length; i++)
{
@@ -200,9 +200,9 @@ transfers_cb (void *cls,
struct TALER_Amount sum;
struct TALER_Amount fees;
- TALER_amount_get_zero (tdd->deposit_value.currency,
+ TALER_amount_set_zero (tdd->deposit_value.currency,
&sum);
- TALER_amount_get_zero (tdd->deposit_fee.currency,
+ TALER_amount_set_zero (tdd->deposit_fee.currency,
&fees);
for (unsigned int j = 0; j<pts->deposits_length; j++)
{
diff --git a/src/testing/testing_api_cmd_tip_pickup.c b/src/testing/testing_api_cmd_tip_pickup.c
index 49e5e969..019113ae 100644
--- a/src/testing/testing_api_cmd_tip_pickup.c
+++ b/src/testing/testing_api_cmd_tip_pickup.c
@@ -244,7 +244,7 @@ tip_pickup_run (void *cls,
&tps->amounts_obj[i]));
if (0 == i)
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (tps->amounts_obj[i].currency,
+ TALER_amount_set_zero (tps->amounts_obj[i].currency,
&tps->total_amount));
GNUNET_assert (0 <
diff --git a/src/testing/testing_api_cmd_wallet_post_orders_refund.c b/src/testing/testing_api_cmd_wallet_post_orders_refund.c
index 80e5e99e..7befb828 100644
--- a/src/testing/testing_api_cmd_wallet_post_orders_refund.c
+++ b/src/testing/testing_api_cmd_wallet_post_orders_refund.c
@@ -110,7 +110,7 @@ refund_cb (
struct TALER_Amount refunded_total;
if (refunds_length > 0)
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (refunds[0].refund_amount.currency,
+ TALER_amount_set_zero (refunds[0].refund_amount.currency,
&refunded_total));
for (unsigned int i = 0; i < refunds_length; ++i)
{