From 06b96ddd0975e7ad3af8ed40a7cee112a27b55f3 Mon Sep 17 00:00:00 2001 From: swrup Date: Mon, 23 Feb 2026 07:24:40 +0100 Subject: [PATCH] --- src/api.ml | 1 - src/http_info.ml | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/api.ml b/src/api.ml index 8d9b3244..e6e7952e 100644 --- a/src/api.ml +++ b/src/api.ml @@ -15,7 +15,6 @@ open Crypto open Signatures module DenominationHash = Hash.DenominationHash -let encode_exn jsont v = Jsont_bytesrw.encode_string jsont v |> Result.get_ok let encode jsont v = Jsont_bytesrw.encode_string jsont v let decode jsont v = Jsont_bytesrw.decode_string jsont v diff --git a/src/http_info.ml b/src/http_info.ml index 2e4287ec..57d052f4 100644 --- a/src/http_info.ml +++ b/src/http_info.ml @@ -234,12 +234,12 @@ let keys req server _env = let* last_issue_date = match Vif.Queries.get req "last_issue_date" with | [] -> Ok None - | v :: _ -> ( - match int_of_string_opt v with + | s :: _ -> ( + match Int64.of_string_opt s with | None -> Error "invalid `?last_issue_date` query param, int_of_string failure" - | Some n -> Ok (Some (Time.Timestamp.of_s (Int64.of_int n)))) + | Some n -> Ok (Some (Timestamp.of_s n))) in let* v = mk_keys ~db_conn keys ~last_issue_date in let s = Api.encode_exn jsont v in