This commit is contained in:
swrup 2025-11-20 20:30:41 +01:00
parent 51007ff612
commit 49b00ad9a7
3 changed files with 10 additions and 1 deletions

View file

@ -225,6 +225,7 @@ let yes_no = function
| "YES" -> `YES
| s -> fail_with (Fmt.str "expected `YES`/`NO` value, got `%s`" s)
let uri s = Uri.of_string s
let amount s = s |> Amount.of_string |> unwrap_res
let duration s = Parse_duration.(s |> parse |> to_ptime_span)
@ -356,6 +357,11 @@ module Config = struct
let default_purse_limit = get "default_purse_limit" |> int
end
module Exchangedb_postgres = struct
let config =
get config ~section:"exchangedb-postgres" ~field:"config" |> uri
end
module Currency = struct
type t = {
enabled: [ `YES | `NO ];