This commit is contained in:
swrup 2025-12-03 16:19:11 +01:00 committed by Swrup
parent 099cd80670
commit b507d540ad
43 changed files with 5647 additions and 1808 deletions

View file

@ -20,9 +20,13 @@ module Exchange = struct
let port = get "port" |> int
let bind_to = get "bind_to"
let master_public_key = get "master_public_key" |> ed25519
(* TODO Defaults to 0.0 if not specified. *)
let stefan_abs = get "stefan_abs" |> amount
let stefan_log = get "stefan_log" |> amount
let stefan_lin = get_opt "stefan_lin" |> Option.map float
let stefan_lin =
get_opt "stefan_lin" |> Option.map float |> Option.value ~default:0.0
let aggregator_idle_sleep_interval =
get "aggregator_idle_sleep_interval" |> duration
@ -40,17 +44,16 @@ module Exchange = struct
let enable_kyc = get "enable_kyc" |> yes_no
let terms_etag = get "terms_etag"
let privacy_etag = get "privacy_etag"
let base_url = get "base_url"
let shopping_url = get_opt "shopping_url"
let open_banking_gateway_url = get_opt "open_banking_gateway_url"
let bank_compliance_language = get_opt "bank_compliance_language"
let aml_spa_dialect = get_opt "aml_spa_dialect"
let toplevel_redirect_url = get_opt "toplevel_redirect_url"
let tiny_amount = get_opt "tiny_amount" |> Option.map amount
(* optional:
tiny_amount
shopping_url
open_banking_gateway_url
aml_spa_dialect
bank_compliance_language
toplevel_redirect_url *)
(* not implemented or not relevant to MTE:
let max_requests = get "max_requests" |> int
base_url
aggregator_shard_size
serve
unixpath
@ -105,7 +108,8 @@ module Currency = struct
fractional_normal_digits= get "fractional_normal_digits" |> int;
fractional_trailing_zero_digits=
get "fractional_trailing_zero_digits" |> int;
alt_unit_names= get "alt_unit_names" |> Parse_alt_unit_names.parse;
alt_unit_names=
get "alt_unit_names" |> Alt_unit_names.decode |> Parse_config.unwrap_res;
}
let all_currencies = List.map parse_currency currency_sections