summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/exchange_api_common.c40
-rw-r--r--src/lib/exchange_api_deposits_get.c2
-rw-r--r--src/lib/exchange_api_handle.c20
-rw-r--r--src/lib/exchange_api_management_get_keys.c20
-rw-r--r--src/lib/exchange_api_melt.c4
-rw-r--r--src/lib/exchange_api_refund.c20
-rw-r--r--src/lib/exchange_api_reserves_get.c2
-rw-r--r--src/lib/exchange_api_transfers_get.c8
-rw-r--r--src/lib/exchange_api_wire.c8
-rw-r--r--src/lib/exchange_api_withdraw2.c2
10 files changed, 63 insertions, 63 deletions
diff --git a/src/lib/exchange_api_common.c b/src/lib/exchange_api_common.c
index 2ad55e6c3..a564a367c 100644
--- a/src/lib/exchange_api_common.c
+++ b/src/lib/exchange_api_common.c
@@ -73,8 +73,8 @@ TALER_EXCHANGE_parse_reserve_history (
struct GNUNET_JSON_Specification hist_spec[] = {
GNUNET_JSON_spec_string ("type",
&type),
- TALER_JSON_spec_amount ("amount",
- &amount),
+ TALER_JSON_spec_amount_any ("amount",
+ &amount),
/* 'wire' and 'signature' are optional depending on 'type'! */
GNUNET_JSON_spec_end ()
};
@@ -145,8 +145,8 @@ TALER_EXCHANGE_parse_reserve_history (
struct GNUNET_JSON_Specification withdraw_spec[] = {
GNUNET_JSON_spec_fixed_auto ("reserve_sig",
&sig),
- TALER_JSON_spec_amount ("withdraw_fee",
- &withdraw_fee),
+ TALER_JSON_spec_amount_any ("withdraw_fee",
+ &withdraw_fee),
GNUNET_JSON_spec_fixed_auto ("h_denom_pub",
&withdraw_purpose.h_denomination_pub),
GNUNET_JSON_spec_fixed_auto ("h_coin_envelope",
@@ -321,8 +321,8 @@ TALER_EXCHANGE_parse_reserve_history (
&rh->details.close_details.exchange_sig),
GNUNET_JSON_spec_fixed_auto ("exchange_pub",
&rh->details.close_details.exchange_pub),
- TALER_JSON_spec_amount_nbo ("closing_fee",
- &rcc.closing_fee),
+ TALER_JSON_spec_amount_any_nbo ("closing_fee",
+ &rcc.closing_fee),
TALER_JSON_spec_absolute_time_nbo ("timestamp",
&rcc.timestamp),
GNUNET_JSON_spec_end ()
@@ -482,8 +482,8 @@ TALER_EXCHANGE_verify_coin_history (
struct TALER_Amount amount;
const char *type;
struct GNUNET_JSON_Specification spec_glob[] = {
- TALER_JSON_spec_amount ("amount",
- &amount),
+ TALER_JSON_spec_amount_any ("amount",
+ &amount),
GNUNET_JSON_spec_string ("type",
&type),
GNUNET_JSON_spec_end ()
@@ -529,8 +529,8 @@ TALER_EXCHANGE_verify_coin_history (
&dr.wallet_timestamp),
TALER_JSON_spec_absolute_time_nbo ("refund_deadline",
&dr.refund_deadline),
- TALER_JSON_spec_amount_nbo ("deposit_fee",
- &dr.deposit_fee),
+ TALER_JSON_spec_amount_any_nbo ("deposit_fee",
+ &dr.deposit_fee),
GNUNET_JSON_spec_fixed_auto ("merchant_pub",
&dr.merchant),
GNUNET_JSON_spec_end ()
@@ -586,8 +586,8 @@ TALER_EXCHANGE_verify_coin_history (
&rm.rc),
GNUNET_JSON_spec_fixed_auto ("h_denom_pub",
&rm.h_denom_pub),
- TALER_JSON_spec_amount_nbo ("melt_fee",
- &rm.melt_fee),
+ TALER_JSON_spec_amount_any_nbo ("melt_fee",
+ &rm.melt_fee),
GNUNET_JSON_spec_end ()
};
@@ -644,8 +644,8 @@ TALER_EXCHANGE_verify_coin_history (
.coin_pub = *coin_pub
};
struct GNUNET_JSON_Specification spec[] = {
- TALER_JSON_spec_amount ("refund_fee",
- &refund_fee),
+ TALER_JSON_spec_amount_any ("refund_fee",
+ &refund_fee),
GNUNET_JSON_spec_fixed_auto ("merchant_sig",
&sig),
GNUNET_JSON_spec_fixed_auto ("h_contract_terms",
@@ -728,8 +728,8 @@ TALER_EXCHANGE_verify_coin_history (
struct TALER_ExchangeSignatureP exchange_sig;
struct TALER_CoinSpendSignatureP coin_sig;
struct GNUNET_JSON_Specification spec[] = {
- TALER_JSON_spec_amount_nbo ("amount",
- &pc.recoup_amount),
+ TALER_JSON_spec_amount_any_nbo ("amount",
+ &pc.recoup_amount),
GNUNET_JSON_spec_fixed_auto ("exchange_sig",
&exchange_sig),
GNUNET_JSON_spec_fixed_auto ("exchange_pub",
@@ -796,8 +796,8 @@ TALER_EXCHANGE_verify_coin_history (
struct TALER_ExchangeSignatureP exchange_sig;
struct TALER_CoinSpendSignatureP coin_sig;
struct GNUNET_JSON_Specification spec[] = {
- TALER_JSON_spec_amount_nbo ("amount",
- &pc.recoup_amount),
+ TALER_JSON_spec_amount_any_nbo ("amount",
+ &pc.recoup_amount),
GNUNET_JSON_spec_fixed_auto ("exchange_sig",
&exchange_sig),
GNUNET_JSON_spec_fixed_auto ("exchange_pub",
@@ -859,8 +859,8 @@ TALER_EXCHANGE_verify_coin_history (
struct TALER_ExchangePublicKeyP exchange_pub;
struct TALER_ExchangeSignatureP exchange_sig;
struct GNUNET_JSON_Specification spec[] = {
- TALER_JSON_spec_amount_nbo ("amount",
- &pc.recoup_amount),
+ TALER_JSON_spec_amount_any_nbo ("amount",
+ &pc.recoup_amount),
GNUNET_JSON_spec_fixed_auto ("exchange_sig",
&exchange_sig),
GNUNET_JSON_spec_fixed_auto ("exchange_pub",
diff --git a/src/lib/exchange_api_deposits_get.c b/src/lib/exchange_api_deposits_get.c
index b4bcfbcd0..efe9070f1 100644
--- a/src/lib/exchange_api_deposits_get.c
+++ b/src/lib/exchange_api_deposits_get.c
@@ -150,7 +150,7 @@ handle_deposit_wtid_finished (void *cls,
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_fixed_auto ("wtid", &dwh->depconf.wtid),
TALER_JSON_spec_absolute_time ("execution_time", &dd.execution_time),
- TALER_JSON_spec_amount ("coin_contribution", &dd.coin_contribution),
+ TALER_JSON_spec_amount_any ("coin_contribution", &dd.coin_contribution),
GNUNET_JSON_spec_fixed_auto ("exchange_sig", &dd.exchange_sig),
GNUNET_JSON_spec_fixed_auto ("exchange_pub", &dd.exchange_pub),
GNUNET_JSON_spec_end ()
diff --git a/src/lib/exchange_api_handle.c b/src/lib/exchange_api_handle.c
index 6eba658fc..43eac97a7 100644
--- a/src/lib/exchange_api_handle.c
+++ b/src/lib/exchange_api_handle.c
@@ -335,16 +335,16 @@ parse_json_denomkey (struct TALER_EXCHANGE_DenomPublicKey *denom_key,
&denom_key->valid_from),
TALER_JSON_spec_absolute_time ("stamp_expire_legal",
&denom_key->expire_legal),
- TALER_JSON_spec_amount ("value",
- &denom_key->value),
- TALER_JSON_spec_amount ("fee_withdraw",
- &denom_key->fee_withdraw),
- TALER_JSON_spec_amount ("fee_deposit",
- &denom_key->fee_deposit),
- TALER_JSON_spec_amount ("fee_refresh",
- &denom_key->fee_refresh),
- TALER_JSON_spec_amount ("fee_refund",
- &denom_key->fee_refund),
+ TALER_JSON_spec_amount_any ("value",
+ &denom_key->value),
+ TALER_JSON_spec_amount_any ("fee_withdraw",
+ &denom_key->fee_withdraw),
+ TALER_JSON_spec_amount_any ("fee_deposit",
+ &denom_key->fee_deposit),
+ TALER_JSON_spec_amount_any ("fee_refresh",
+ &denom_key->fee_refresh),
+ TALER_JSON_spec_amount_any ("fee_refund",
+ &denom_key->fee_refund),
GNUNET_JSON_spec_rsa_public_key ("denom_pub",
&denom_key->key.rsa_public_key),
GNUNET_JSON_spec_end ()
diff --git a/src/lib/exchange_api_management_get_keys.c b/src/lib/exchange_api_management_get_keys.c
index 925ca804d..840629a14 100644
--- a/src/lib/exchange_api_management_get_keys.c
+++ b/src/lib/exchange_api_management_get_keys.c
@@ -169,8 +169,8 @@ handle_ok (struct TALER_EXCHANGE_ManagementGetKeysHandle *gh,
= &fk.denom_keys[i];
const char *section_name;
struct GNUNET_JSON_Specification spec[] = {
- TALER_JSON_spec_amount ("value",
- &denom_key->value),
+ TALER_JSON_spec_amount_any ("value",
+ &denom_key->value),
TALER_JSON_spec_absolute_time ("stamp_start",
&denom_key->valid_from),
TALER_JSON_spec_absolute_time ("stamp_expire_withdraw",
@@ -181,14 +181,14 @@ handle_ok (struct TALER_EXCHANGE_ManagementGetKeysHandle *gh,
&denom_key->expire_legal),
GNUNET_JSON_spec_rsa_public_key ("denom_pub",
&denom_key->key.rsa_public_key),
- TALER_JSON_spec_amount ("fee_withdraw",
- &denom_key->fee_withdraw),
- TALER_JSON_spec_amount ("fee_deposit",
- &denom_key->fee_deposit),
- TALER_JSON_spec_amount ("fee_refresh",
- &denom_key->fee_refresh),
- TALER_JSON_spec_amount ("fee_refund",
- &denom_key->fee_refund),
+ TALER_JSON_spec_amount_any ("fee_withdraw",
+ &denom_key->fee_withdraw),
+ TALER_JSON_spec_amount_any ("fee_deposit",
+ &denom_key->fee_deposit),
+ TALER_JSON_spec_amount_any ("fee_refresh",
+ &denom_key->fee_refresh),
+ TALER_JSON_spec_amount_any ("fee_refund",
+ &denom_key->fee_refund),
GNUNET_JSON_spec_fixed_auto ("denom_secmod_sig",
&denom_key->denom_secmod_sig),
GNUNET_JSON_spec_string ("section_name",
diff --git a/src/lib/exchange_api_melt.c b/src/lib/exchange_api_melt.c
index c3e59905c..1f369c11b 100644
--- a/src/lib/exchange_api_melt.c
+++ b/src/lib/exchange_api_melt.c
@@ -220,8 +220,8 @@ verify_melt_signature_spend_conflict (struct TALER_EXCHANGE_MeltHandle *mh,
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_json ("history", &history),
GNUNET_JSON_spec_fixed_auto ("coin_pub", &coin_pub),
- TALER_JSON_spec_amount ("original_value", &original_value),
- TALER_JSON_spec_amount ("requested_value", &melt_value_with_fee),
+ TALER_JSON_spec_amount_any ("original_value", &original_value),
+ TALER_JSON_spec_amount_any ("requested_value", &melt_value_with_fee),
GNUNET_JSON_spec_end ()
};
const struct MeltedCoin *mc;
diff --git a/src/lib/exchange_api_refund.c b/src/lib/exchange_api_refund.c
index f991c5f56..2ac612db5 100644
--- a/src/lib/exchange_api_refund.c
+++ b/src/lib/exchange_api_refund.c
@@ -176,8 +176,8 @@ verify_conflict_history_ok (struct TALER_EXCHANGE_RefundHandle *rh,
struct TALER_Amount amount;
const char *type;
struct GNUNET_JSON_Specification spec_glob[] = {
- TALER_JSON_spec_amount ("amount",
- &amount),
+ TALER_JSON_spec_amount_any ("amount",
+ &amount),
GNUNET_JSON_spec_string ("type",
&type),
GNUNET_JSON_spec_end ()
@@ -215,8 +215,8 @@ verify_conflict_history_ok (struct TALER_EXCHANGE_RefundHandle *rh,
&dr.wallet_timestamp),
TALER_JSON_spec_absolute_time_nbo ("refund_deadline",
&dr.refund_deadline),
- TALER_JSON_spec_amount_nbo ("deposit_fee",
- &dr.deposit_fee),
+ TALER_JSON_spec_amount_any_nbo ("deposit_fee",
+ &dr.deposit_fee),
GNUNET_JSON_spec_fixed_auto ("merchant_pub",
&dr.merchant),
GNUNET_JSON_spec_end ()
@@ -283,8 +283,8 @@ verify_conflict_history_ok (struct TALER_EXCHANGE_RefundHandle *rh,
.coin_pub = rh->depconf.coin_pub
};
struct GNUNET_JSON_Specification spec[] = {
- TALER_JSON_spec_amount ("refund_fee",
- &refund_fee),
+ TALER_JSON_spec_amount_any ("refund_fee",
+ &refund_fee),
GNUNET_JSON_spec_fixed_auto ("merchant_sig",
&sig),
GNUNET_JSON_spec_fixed_auto ("h_contract_terms",
@@ -452,12 +452,12 @@ verify_failed_dependency_ok (struct TALER_EXCHANGE_RefundHandle *rh,
};
uint64_t rtransaction_id;
struct GNUNET_JSON_Specification spec[] = {
- TALER_JSON_spec_amount ("amount",
- &amount),
+ TALER_JSON_spec_amount_any ("amount",
+ &amount),
GNUNET_JSON_spec_string ("type",
&type),
- TALER_JSON_spec_amount ("refund_fee",
- &refund_fee),
+ TALER_JSON_spec_amount_any ("refund_fee",
+ &refund_fee),
GNUNET_JSON_spec_fixed_auto ("merchant_sig",
&sig),
GNUNET_JSON_spec_fixed_auto ("h_contract_terms",
diff --git a/src/lib/exchange_api_reserves_get.c b/src/lib/exchange_api_reserves_get.c
index 8977495ec..563deeaf6 100644
--- a/src/lib/exchange_api_reserves_get.c
+++ b/src/lib/exchange_api_reserves_get.c
@@ -88,7 +88,7 @@ handle_reserves_get_ok (struct TALER_EXCHANGE_ReservesGetHandle *rgh,
struct TALER_Amount balance;
struct TALER_Amount balance_from_history;
struct GNUNET_JSON_Specification spec[] = {
- TALER_JSON_spec_amount ("balance", &balance),
+ TALER_JSON_spec_amount_any ("balance", &balance),
GNUNET_JSON_spec_end ()
};
struct TALER_EXCHANGE_HttpResponse hr = {
diff --git a/src/lib/exchange_api_transfers_get.c b/src/lib/exchange_api_transfers_get.c
index a3a82368c..1f6e419c9 100644
--- a/src/lib/exchange_api_transfers_get.c
+++ b/src/lib/exchange_api_transfers_get.c
@@ -89,8 +89,8 @@ check_transfers_get_response_ok (
struct TALER_Amount total_expected;
struct TALER_MerchantPublicKeyP merchant_pub;
struct GNUNET_JSON_Specification spec[] = {
- TALER_JSON_spec_amount ("total", &td.total_amount),
- TALER_JSON_spec_amount ("wire_fee", &td.wire_fee),
+ TALER_JSON_spec_amount_any ("total", &td.total_amount),
+ TALER_JSON_spec_amount_any ("wire_fee", &td.wire_fee),
GNUNET_JSON_spec_fixed_auto ("merchant_pub", &merchant_pub),
GNUNET_JSON_spec_fixed_auto ("h_wire", &td.h_wire),
TALER_JSON_spec_absolute_time ("execution_time", &td.execution_time),
@@ -146,8 +146,8 @@ check_transfers_get_response_ok (
GNUNET_JSON_spec_fixed_auto ("h_contract_terms",
&detail->h_contract_terms),
GNUNET_JSON_spec_fixed_auto ("coin_pub", &detail->coin_pub),
- TALER_JSON_spec_amount ("deposit_value", &detail->coin_value),
- TALER_JSON_spec_amount ("deposit_fee", &detail->coin_fee),
+ TALER_JSON_spec_amount_any ("deposit_value", &detail->coin_value),
+ TALER_JSON_spec_amount_any ("deposit_fee", &detail->coin_fee),
GNUNET_JSON_spec_end ()
};
diff --git a/src/lib/exchange_api_wire.c b/src/lib/exchange_api_wire.c
index 4586d2ea1..5d5a0f4ae 100644
--- a/src/lib/exchange_api_wire.c
+++ b/src/lib/exchange_api_wire.c
@@ -143,10 +143,10 @@ parse_fees (json_t *fees)
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_fixed_auto ("sig",
&wa->master_sig),
- TALER_JSON_spec_amount ("wire_fee",
- &wa->wire_fee),
- TALER_JSON_spec_amount ("closing_fee",
- &wa->closing_fee),
+ TALER_JSON_spec_amount_any ("wire_fee",
+ &wa->wire_fee),
+ TALER_JSON_spec_amount_any ("closing_fee",
+ &wa->closing_fee),
TALER_JSON_spec_absolute_time ("start_date",
&wa->start_date),
TALER_JSON_spec_absolute_time ("end_date",
diff --git a/src/lib/exchange_api_withdraw2.c b/src/lib/exchange_api_withdraw2.c
index 585cd9215..6adf85520 100644
--- a/src/lib/exchange_api_withdraw2.c
+++ b/src/lib/exchange_api_withdraw2.c
@@ -152,7 +152,7 @@ reserve_withdraw_payment_required (
json_t *history;
size_t len;
struct GNUNET_JSON_Specification spec[] = {
- TALER_JSON_spec_amount ("balance", &balance),
+ TALER_JSON_spec_amount_any ("balance", &balance),
GNUNET_JSON_spec_end ()
};