summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-08-22 23:15:08 +0200
committerChristian Grothoff <christian@grothoff.org>2023-08-22 23:15:08 +0200
commitc98d960d1badd1eeb834bacbc133960e2f86d304 (patch)
treefc94b246475ff387cf5aa4d8bbc3f0aa2f4b7d65 /src/lib
parent525426db10c179fcacd19487f6c22cac837b2d40 (diff)
downloadmerchant-c98d960d1badd1eeb834bacbc133960e2f86d304.tar.gz
merchant-c98d960d1badd1eeb834bacbc133960e2f86d304.tar.bz2
merchant-c98d960d1badd1eeb834bacbc133960e2f86d304.zip
add currency to amounts in merchant DB
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/merchant_api_get_instance.c37
-rw-r--r--src/lib/merchant_api_patch_instance.c12
-rw-r--r--src/lib/merchant_api_post_instances.c12
3 files changed, 24 insertions, 37 deletions
diff --git a/src/lib/merchant_api_get_instance.c b/src/lib/merchant_api_get_instance.c
index cf58f828..9cfbcf83 100644
--- a/src/lib/merchant_api_get_instance.c
+++ b/src/lib/merchant_api_get_instance.c
@@ -98,28 +98,27 @@ handle_get_instance_finished (void *cls,
const json_t *address;
const json_t *jurisdiction;
struct GNUNET_JSON_Specification spec[] = {
- GNUNET_JSON_spec_array_const ("accounts",
- &accounts),
- GNUNET_JSON_spec_string ("name",
- &igr.details.ok.details.name),
- GNUNET_JSON_spec_string ("user_type",
- &uts),
+ GNUNET_JSON_spec_array_const (
+ "accounts",
+ &accounts),
+ GNUNET_JSON_spec_string (
+ "name",
+ &igr.details.ok.details.name),
+ GNUNET_JSON_spec_string (
+ "user_type",
+ &uts),
GNUNET_JSON_spec_fixed_auto (
"merchant_pub",
&igr.details.ok.details.merchant_pub),
- GNUNET_JSON_spec_object_const ("address",
- &address),
- GNUNET_JSON_spec_object_const ("jurisdiction",
- &jurisdiction),
- TALER_JSON_spec_amount_any (
- "default_max_wire_fee",
- &igr.details.ok.details.default_max_wire_fee),
- GNUNET_JSON_spec_uint32 (
- "default_wire_fee_amortization",
- &igr.details.ok.details.default_wire_fee_amortization),
- TALER_JSON_spec_amount_any (
- "default_max_deposit_fee",
- &igr.details.ok.details.default_max_deposit_fee),
+ GNUNET_JSON_spec_object_const (
+ "address",
+ &address),
+ GNUNET_JSON_spec_object_const (
+ "jurisdiction",
+ &jurisdiction),
+ GNUNET_JSON_spec_bool (
+ "use_stefan",
+ &igr.details.ok.details.use_stefan),
GNUNET_JSON_spec_relative_time (
"default_wire_transfer_delay",
&igr.details.ok.details.default_wire_transfer_delay),
diff --git a/src/lib/merchant_api_patch_instance.c b/src/lib/merchant_api_patch_instance.c
index 6a3c06c1..8b4b6205 100644
--- a/src/lib/merchant_api_patch_instance.c
+++ b/src/lib/merchant_api_patch_instance.c
@@ -164,9 +164,7 @@ TALER_MERCHANT_instance_patch (
enum TALER_KYCLOGIC_KycUserType ut,
const json_t *address,
const json_t *jurisdiction,
- const struct TALER_Amount *default_max_wire_fee,
- uint32_t default_wire_fee_amortization,
- const struct TALER_Amount *default_max_deposit_fee,
+ bool use_stefan,
struct GNUNET_TIME_Relative default_wire_transfer_delay,
struct GNUNET_TIME_Relative default_pay_delay,
TALER_MERCHANT_InstancePatchCallback cb,
@@ -229,12 +227,8 @@ TALER_MERCHANT_instance_patch (
(json_t *) address),
GNUNET_JSON_pack_object_incref ("jurisdiction",
(json_t *) jurisdiction),
- TALER_JSON_pack_amount ("default_max_wire_fee",
- default_max_wire_fee),
- GNUNET_JSON_pack_uint64 ("default_wire_fee_amortization",
- default_wire_fee_amortization),
- TALER_JSON_pack_amount ("default_max_deposit_fee",
- default_max_deposit_fee),
+ GNUNET_JSON_pack_bool ("use_stefan",
+ use_stefan),
GNUNET_JSON_pack_time_rel ("default_wire_transfer_delay",
default_wire_transfer_delay),
GNUNET_JSON_pack_time_rel ("default_pay_delay",
diff --git a/src/lib/merchant_api_post_instances.c b/src/lib/merchant_api_post_instances.c
index 77168e2a..77336187 100644
--- a/src/lib/merchant_api_post_instances.c
+++ b/src/lib/merchant_api_post_instances.c
@@ -170,9 +170,7 @@ TALER_MERCHANT_instances_post (
enum TALER_KYCLOGIC_KycUserType ut,
const json_t *address,
const json_t *jurisdiction,
- const struct TALER_Amount *default_max_wire_fee,
- uint32_t default_wire_fee_amortization,
- const struct TALER_Amount *default_max_deposit_fee,
+ bool use_stefan,
struct GNUNET_TIME_Relative default_wire_transfer_delay,
struct GNUNET_TIME_Relative default_pay_delay,
const char *auth_token,
@@ -267,12 +265,8 @@ TALER_MERCHANT_instances_post (
(json_t *) address),
GNUNET_JSON_pack_object_incref ("jurisdiction",
(json_t *) jurisdiction),
- TALER_JSON_pack_amount ("default_max_wire_fee",
- default_max_wire_fee),
- GNUNET_JSON_pack_uint64 ("default_wire_fee_amortization",
- default_wire_fee_amortization),
- TALER_JSON_pack_amount ("default_max_deposit_fee",
- default_max_deposit_fee),
+ GNUNET_JSON_pack_bool ("use_stefan",
+ use_stefan),
GNUNET_JSON_pack_time_rel ("default_wire_transfer_delay",
default_wire_transfer_delay),
GNUNET_JSON_pack_time_rel ("default_pay_delay",