summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-07-24 09:12:52 +0200
committerChristian Grothoff <christian@grothoff.org>2021-07-24 09:12:52 +0200
commitfb23045fe1d062cd4f26f3265ac94ded47660abd (patch)
treeb2c4f905f989aaca17830d18a1f7616753800993 /src/lib
parentf9fc9f73df9eb5544882815abe0afe8d789a4ef6 (diff)
downloadmerchant-fb23045fe1d062cd4f26f3265ac94ded47660abd.tar.gz
merchant-fb23045fe1d062cd4f26f3265ac94ded47660abd.tar.bz2
merchant-fb23045fe1d062cd4f26f3265ac94ded47660abd.zip
implement #6939 transformation
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/merchant_api_get_instance.c4
-rw-r--r--src/lib/merchant_api_get_orders.c2
-rw-r--r--src/lib/merchant_api_get_product.c2
-rw-r--r--src/lib/merchant_api_get_reserve.c10
-rw-r--r--src/lib/merchant_api_get_reserves.c8
-rw-r--r--src/lib/merchant_api_get_tips.c2
-rw-r--r--src/lib/merchant_api_get_transfers.c2
-rw-r--r--src/lib/merchant_api_merchant_get_order.c10
-rw-r--r--src/lib/merchant_api_merchant_get_tip.c6
-rw-r--r--src/lib/merchant_api_post_transfers.c8
-rw-r--r--src/lib/merchant_api_wallet_get_order.c2
-rw-r--r--src/lib/merchant_api_wallet_get_tip.c2
-rw-r--r--src/lib/merchant_api_wallet_post_order_refund.c6
13 files changed, 32 insertions, 32 deletions
diff --git a/src/lib/merchant_api_get_instance.c b/src/lib/merchant_api_get_instance.c
index 696bb964..64ee331e 100644
--- a/src/lib/merchant_api_get_instance.c
+++ b/src/lib/merchant_api_get_instance.c
@@ -112,11 +112,11 @@ handle_get_instance_finished (void *cls,
&address),
GNUNET_JSON_spec_json ("jurisdiction",
&jurisdiction),
- TALER_JSON_spec_amount ("default_max_wire_fee",
+ TALER_JSON_spec_amount_any ("default_max_wire_fee",
&default_max_wire_fee),
GNUNET_JSON_spec_uint32 ("default_wire_fee_amortization",
&default_wire_fee_amortization),
- TALER_JSON_spec_amount ("default_max_deposit_fee",
+ TALER_JSON_spec_amount_any ("default_max_deposit_fee",
&default_max_deposit_fee),
TALER_JSON_spec_relative_time ("default_wire_transfer_delay",
&default_wire_transfer_delay),
diff --git a/src/lib/merchant_api_get_orders.c b/src/lib/merchant_api_get_orders.c
index ddf9cdd2..441b5ff8 100644
--- a/src/lib/merchant_api_get_orders.c
+++ b/src/lib/merchant_api_get_orders.c
@@ -90,7 +90,7 @@ parse_orders (const json_t *ia,
&ie->timestamp),
GNUNET_JSON_spec_uint64 ("row_id",
&ie->order_serial),
- TALER_JSON_spec_amount ("amount",
+ TALER_JSON_spec_amount_any ("amount",
&ie->amount),
GNUNET_JSON_spec_string ("summary",
&ie->summary),
diff --git a/src/lib/merchant_api_get_product.c b/src/lib/merchant_api_get_product.c
index 9e0f9114..7fe053d7 100644
--- a/src/lib/merchant_api_get_product.c
+++ b/src/lib/merchant_api_get_product.c
@@ -110,7 +110,7 @@ handle_get_product_finished (void *cls,
&description_i18n),
GNUNET_JSON_spec_string ("unit",
&unit),
- TALER_JSON_spec_amount ("price",
+ TALER_JSON_spec_amount_any ("price",
&price),
GNUNET_JSON_spec_string ("image",
&image),
diff --git a/src/lib/merchant_api_get_reserve.c b/src/lib/merchant_api_get_reserve.c
index 79a3fb32..591e0226 100644
--- a/src/lib/merchant_api_get_reserve.c
+++ b/src/lib/merchant_api_get_reserve.c
@@ -110,13 +110,13 @@ handle_reserve_get_finished (void *cls,
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("payto_uri",
&payto_uri)),
- TALER_JSON_spec_amount ("merchant_initial_amount",
+ TALER_JSON_spec_amount_any ("merchant_initial_amount",
&rs.merchant_initial_amount),
- TALER_JSON_spec_amount ("exchange_initial_amount",
+ TALER_JSON_spec_amount_any ("exchange_initial_amount",
&rs.exchange_initial_amount),
- TALER_JSON_spec_amount ("pickup_amount",
+ TALER_JSON_spec_amount_any ("pickup_amount",
&rs.pickup_amount),
- TALER_JSON_spec_amount ("committed_amount",
+ TALER_JSON_spec_amount_any ("committed_amount",
&rs.committed_amount),
GNUNET_JSON_spec_end ()
};
@@ -171,7 +171,7 @@ handle_reserve_get_finished (void *cls,
struct GNUNET_JSON_Specification ispec[] = {
GNUNET_JSON_spec_fixed_auto ("tip_id",
&td->tip_id),
- TALER_JSON_spec_amount ("total_amount",
+ TALER_JSON_spec_amount_any ("total_amount",
&td->amount),
GNUNET_JSON_spec_string ("reason",
&td->reason),
diff --git a/src/lib/merchant_api_get_reserves.c b/src/lib/merchant_api_get_reserves.c
index 32455a57..fc518839 100644
--- a/src/lib/merchant_api_get_reserves.c
+++ b/src/lib/merchant_api_get_reserves.c
@@ -138,13 +138,13 @@ handle_reserves_get_finished (void *cls,
&rd->creation_time),
TALER_JSON_spec_absolute_time ("expiration_time",
&rd->expiration_time),
- TALER_JSON_spec_amount ("merchant_initial_amount",
+ TALER_JSON_spec_amount_any ("merchant_initial_amount",
&rd->merchant_initial_amount),
- TALER_JSON_spec_amount ("exchange_initial_amount",
+ TALER_JSON_spec_amount_any ("exchange_initial_amount",
&rd->exchange_initial_amount),
- TALER_JSON_spec_amount ("pickup_amount",
+ TALER_JSON_spec_amount_any ("pickup_amount",
&rd->pickup_amount),
- TALER_JSON_spec_amount ("committed_amount",
+ TALER_JSON_spec_amount_any ("committed_amount",
&rd->committed_amount),
GNUNET_JSON_spec_bool ("active",
&rd->active),
diff --git a/src/lib/merchant_api_get_tips.c b/src/lib/merchant_api_get_tips.c
index fd3dfdae..516ca591 100644
--- a/src/lib/merchant_api_get_tips.c
+++ b/src/lib/merchant_api_get_tips.c
@@ -88,7 +88,7 @@ parse_tips (const json_t *ia,
&ie->row_id),
GNUNET_JSON_spec_fixed_auto ("tip_id",
&ie->tip_id),
- TALER_JSON_spec_amount ("tip_amount",
+ TALER_JSON_spec_amount_any ("tip_amount",
&ie->tip_amount),
GNUNET_JSON_spec_end ()
};
diff --git a/src/lib/merchant_api_get_transfers.c b/src/lib/merchant_api_get_transfers.c
index e31fb38f..f89215fc 100644
--- a/src/lib/merchant_api_get_transfers.c
+++ b/src/lib/merchant_api_get_transfers.c
@@ -132,7 +132,7 @@ handle_transfers_get_finished (void *cls,
json_array_foreach (transfers, i, transfer) {
struct TALER_MERCHANT_TransferData *td = &tds[i];
struct GNUNET_JSON_Specification ispec[] = {
- TALER_JSON_spec_amount ("credit_amount",
+ TALER_JSON_spec_amount_any ("credit_amount",
&td->credit_amount),
GNUNET_JSON_spec_fixed_auto ("wtid",
&td->wtid),
diff --git a/src/lib/merchant_api_merchant_get_order.c b/src/lib/merchant_api_merchant_get_order.c
index 025460c2..f4dc8131 100644
--- a/src/lib/merchant_api_merchant_get_order.c
+++ b/src/lib/merchant_api_merchant_get_order.c
@@ -81,7 +81,7 @@ handle_unpaid (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh,
.status = TALER_MERCHANT_OSC_UNPAID
};
struct GNUNET_JSON_Specification spec[] = {
- TALER_JSON_spec_amount ("total_amount",
+ TALER_JSON_spec_amount_any ("total_amount",
&osr.details.unpaid.contract_amount),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_string ("already_paid_order_id",
@@ -182,13 +182,13 @@ handle_paid (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh,
&osr.details.paid.refund_pending),
GNUNET_JSON_spec_bool ("wired",
&osr.details.paid.wired),
- TALER_JSON_spec_amount ("deposit_total",
+ TALER_JSON_spec_amount_any ("deposit_total",
&osr.details.paid.deposit_total),
GNUNET_JSON_spec_uint32 ("exchange_ec",
&ec32),
GNUNET_JSON_spec_uint32 ("exchange_hc",
&hc32),
- TALER_JSON_spec_amount ("refund_amount",
+ TALER_JSON_spec_amount_any ("refund_amount",
&osr.details.paid.refund_amount),
GNUNET_JSON_spec_json ("contract_terms",
(json_t **) &osr.details.paid.contract_terms),
@@ -250,7 +250,7 @@ handle_paid (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh,
&wt->wtid),
TALER_JSON_spec_absolute_time ("execution_time",
&wt->execution_time),
- TALER_JSON_spec_amount ("amount",
+ TALER_JSON_spec_amount_any ("amount",
&wt->total_amount),
GNUNET_JSON_spec_bool ("confirmed",
&wt->confirmed),
@@ -319,7 +319,7 @@ handle_paid (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh,
const json_t *w = json_array_get (refund_details,
i);
struct GNUNET_JSON_Specification ispec[] = {
- TALER_JSON_spec_amount ("amount",
+ TALER_JSON_spec_amount_any ("amount",
&ro->refund_amount),
GNUNET_JSON_spec_string ("reason",
&ro->reason),
diff --git a/src/lib/merchant_api_merchant_get_tip.c b/src/lib/merchant_api_merchant_get_tip.c
index aad72584..2ee5a56c 100644
--- a/src/lib/merchant_api_merchant_get_tip.c
+++ b/src/lib/merchant_api_merchant_get_tip.c
@@ -82,7 +82,7 @@ parse_pickups (const json_t *pa,
&pickup->pickup_id),
GNUNET_JSON_spec_uint64 ("num_planchets",
&pickup->num_planchets),
- TALER_JSON_spec_amount ("requested_amount",
+ TALER_JSON_spec_amount_any ("requested_amount",
&pickup->requested_amount),
GNUNET_JSON_spec_end ()
};
@@ -152,9 +152,9 @@ handle_merchant_tip_get_finished (void *cls,
struct GNUNET_TIME_Absolute expiration;
struct TALER_ReservePublicKeyP reserve_pub;
struct GNUNET_JSON_Specification spec[] = {
- TALER_JSON_spec_amount ("total_authorized",
+ TALER_JSON_spec_amount_any ("total_authorized",
&total_authorized),
- TALER_JSON_spec_amount ("total_picked_up",
+ TALER_JSON_spec_amount_any ("total_picked_up",
&total_picked_up),
GNUNET_JSON_spec_string ("reason",
&reason),
diff --git a/src/lib/merchant_api_post_transfers.c b/src/lib/merchant_api_post_transfers.c
index a9eaf288..3e1a55d5 100644
--- a/src/lib/merchant_api_post_transfers.c
+++ b/src/lib/merchant_api_post_transfers.c
@@ -103,9 +103,9 @@ handle_post_transfers_finished (void *cls,
struct GNUNET_TIME_Absolute execution_time;
json_t *deposit_sums;
struct GNUNET_JSON_Specification spec[] = {
- TALER_JSON_spec_amount ("total",
+ TALER_JSON_spec_amount_any ("total",
&total),
- TALER_JSON_spec_amount ("wire_fee",
+ TALER_JSON_spec_amount_any ("wire_fee",
&wire_fee),
TALER_JSON_spec_absolute_time ("execution_time",
&execution_time),
@@ -148,9 +148,9 @@ handle_post_transfers_finished (void *cls,
struct GNUNET_JSON_Specification ispec[] = {
GNUNET_JSON_spec_string ("order_id",
&d->order_id),
- TALER_JSON_spec_amount ("deposit_value",
+ TALER_JSON_spec_amount_any ("deposit_value",
&d->deposit_value),
- TALER_JSON_spec_amount ("deposit_fee",
+ TALER_JSON_spec_amount_any ("deposit_fee",
&d->deposit_fee),
GNUNET_JSON_spec_end ()
};
diff --git a/src/lib/merchant_api_wallet_get_order.c b/src/lib/merchant_api_wallet_get_order.c
index 0452d70d..08a91ef7 100644
--- a/src/lib/merchant_api_wallet_get_order.c
+++ b/src/lib/merchant_api_wallet_get_order.c
@@ -122,7 +122,7 @@ handle_wallet_get_order_finished (void *cls,
&refunded),
GNUNET_JSON_spec_bool ("refund_pending",
&refund_pending),
- TALER_JSON_spec_amount ("refund_amount",
+ TALER_JSON_spec_amount_any ("refund_amount",
&refund_amount),
GNUNET_JSON_spec_end ()
};
diff --git a/src/lib/merchant_api_wallet_get_tip.c b/src/lib/merchant_api_wallet_get_tip.c
index c6a6039d..d1343f9d 100644
--- a/src/lib/merchant_api_wallet_get_tip.c
+++ b/src/lib/merchant_api_wallet_get_tip.c
@@ -100,7 +100,7 @@ handle_wallet_tip_get_finished (void *cls,
&expiration),
GNUNET_JSON_spec_string ("exchange_url",
&exchange_url),
- TALER_JSON_spec_amount ("tip_amount",
+ TALER_JSON_spec_amount_any ("tip_amount",
&amount_remaining),
GNUNET_JSON_spec_end ()
};
diff --git a/src/lib/merchant_api_wallet_post_order_refund.c b/src/lib/merchant_api_wallet_post_order_refund.c
index c527696b..ff19b09e 100644
--- a/src/lib/merchant_api_wallet_post_order_refund.c
+++ b/src/lib/merchant_api_wallet_post_order_refund.c
@@ -134,7 +134,7 @@ handle_refund_finished (void *cls,
struct TALER_MerchantPublicKeyP merchant_pub;
unsigned int refund_len;
struct GNUNET_JSON_Specification spec[] = {
- TALER_JSON_spec_amount ("refund_amount",
+ TALER_JSON_spec_amount_any ("refund_amount",
&refund_amount),
GNUNET_JSON_spec_json ("refunds",
&refunds),
@@ -214,7 +214,7 @@ handle_refund_finished (void *cls,
&rd->rtransaction_id),
GNUNET_JSON_spec_fixed_auto ("coin_pub",
&rd->coin_pub),
- TALER_JSON_spec_amount ("refund_amount",
+ TALER_JSON_spec_amount_any ("refund_amount",
&rd->refund_amount),
GNUNET_JSON_spec_end ()
};
@@ -241,7 +241,7 @@ handle_refund_finished (void *cls,
&rd->coin_pub),
GNUNET_JSON_spec_uint64 ("rtransaction_id",
&rd->rtransaction_id),
- TALER_JSON_spec_amount ("refund_amount",
+ TALER_JSON_spec_amount_any ("refund_amount",
&rd->refund_amount),
GNUNET_JSON_spec_end ()
};