aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2024-07-15 17:29:59 +0200
committerFlorian Dold <florian@dold.me>2024-07-15 17:29:59 +0200
commit5200133f5e8def77885fc599db60d3636e8e6744 (patch)
tree2a1fbb0886bbfd7f3405fb7c7066ffe09112a4e7
parent55a58502523087aae9452011c24f2fc0c8651b37 (diff)
fakebank: return currency_spec in corebank API as per spec
-rw-r--r--src/bank-lib/fakebank_bank.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/bank-lib/fakebank_bank.c b/src/bank-lib/fakebank_bank.c
index e9a437e21..96100943c 100644
--- a/src/bank-lib/fakebank_bank.c
+++ b/src/bank-lib/fakebank_bank.c
@@ -72,11 +72,31 @@ TALER_FAKEBANK_bank_main_ (
connection,
MHD_HTTP_OK,
GNUNET_JSON_pack_string ("version",
- "4:0:4"), /* not sure, API versions are not properly marked up! */
+ "4:1:4"), /* not sure, API versions are not properly marked up! */
GNUNET_JSON_pack_string ("currency",
h->currency),
GNUNET_JSON_pack_string ("implementation",
"urn:net:taler:specs:bank:fakebank"),
+ GNUNET_JSON_pack_object_steal (
+ "currency_specification",
+ GNUNET_JSON_PACK (
+ GNUNET_JSON_pack_string ("name",
+ h->currency),
+ GNUNET_JSON_pack_string ("currency",
+ h->currency),
+ GNUNET_JSON_pack_uint64 ("num_fractional_input_digits",
+ 2),
+ GNUNET_JSON_pack_uint64 ("num_fractional_normal_digits",
+ 2),
+ GNUNET_JSON_pack_uint64 ("num_fractional_trailing_zero_digits",
+ 2),
+ GNUNET_JSON_pack_object_steal (
+ "alt_unit_names",
+ GNUNET_JSON_PACK (
+ GNUNET_JSON_pack_string ("0",
+ h->currency))),
+ GNUNET_JSON_pack_string ("name",
+ h->currency))),
GNUNET_JSON_pack_string ("name",
"taler-corebank"));
}