diff --git a/src/amount.ml b/src/amount.ml index 3caeaf68..7ff74514 100644 --- a/src/amount.ml +++ b/src/amount.ml @@ -1,8 +1,4 @@ -(* TODO - have a currency agnostic amount_lib.ml - and specialize amount.ml to Config.currency?? - - have safe amount arithmetic *) +(* TODO implement operations on amounts *) open Syntax type sign = diff --git a/src/api.ml b/src/api.ml index 062ca181..2a6ea9cc 100644 --- a/src/api.ml +++ b/src/api.ml @@ -85,9 +85,6 @@ module Bytes64 = struct ~decode:of_octets Caqti_type.octets end -(* TODO error response - - use GANA error codes - https://git.gnunet.org/gana.git/tree/gnu-taler-error-codes/registry.rec *) module ErrorDetail = struct type t = { code: int; diff --git a/src/headers.ml b/src/headers.ml index fd6ebfc7..6d4a64f7 100644 --- a/src/headers.ml +++ b/src/headers.ml @@ -6,7 +6,8 @@ let accept_header_value = let avail_languages_header_value = Fmt.str "%a" (Fmt.array ~sep:(Fmt.any ", ") Fmt.string) Assets.Language.arr -(* TODO Cohttp raises on invalid *) +(* TODO better headers_lib + Cohttp raises on invalid *) let select_mimetype headers = let opt = Vif.Headers.get headers "accept" in Cohttp.Accept.media_ranges opt diff --git a/src/keys.ml b/src/keys.ml index 6ad2a4f6..382079a9 100644 --- a/src/keys.ml +++ b/src/keys.ml @@ -1,7 +1,6 @@ open Syntax open Crypto -(* TODO better error type *) type 'a result = ('a, string) Result.t module type S = sig @@ -33,8 +32,8 @@ module Make (Conn : Pg.CONN) : S = struct let conn = (module Conn : Pg.CONN) - (* TODO - error "key not found", either: + (* TODO better error + can only be "key not found", either: - we tried to sign with a key that is not ours - key was revoked - bad keyring state *) diff --git a/src/pg.ml b/src/pg.ml index eb4c789e..b4543f8a 100644 --- a/src/pg.ml +++ b/src/pg.ml @@ -1,11 +1,6 @@ (* TODO - can we avoid amount tuple boilerplate? - clean up caqti error type - transaction - - GNU Taler use of db-events? - it seems caqti/pgx does not support it *) + GNU Taler use of db-events? it seems caqti/pgx does not support it *) module type CONN = Caqti_miou.CONNECTION diff --git a/src/respond.ml b/src/respond.ml index 17f67039..a7780c36 100644 --- a/src/respond.ml +++ b/src/respond.ml @@ -1,6 +1,3 @@ -(* TODO response - use ErrorDetail *) - let encode_error_detail err = match Api.(encode ErrorDetail.jsont err) with | Error e -> Fmt.failwith "json encoding error on `ErrorDetail`: %s." e diff --git a/src/secmod_eddsa.ml b/src/secmod_eddsa.ml index 6cf9ac1e..2eece202 100644 --- a/src/secmod_eddsa.ml +++ b/src/secmod_eddsa.ml @@ -103,7 +103,7 @@ let split_in_periodes ~start ~end_ = in go acc start end_ -(* TODO do not exceed lookahead (probably more important...) *) +(* TODO do not exceed lookahead *) (* try to not generate keys with validity start in the past *) let gen_additional_keys_until_lookahead ~now l = let start = @@ -118,7 +118,6 @@ let gen_additional_keys_until_lookahead ~now l = let new_keys = List.map (fun (t1, t2) -> gen_key t1 t2) periodes in new_keys -(* TODO config *) let sm_key_fpath = Result.get_ok @@ @@ -221,5 +220,5 @@ end - more checks - sign: check timestamps before signing - schedule tasks - - !lock + - ! use lock *) diff --git a/src/syntax.ml b/src/syntax.ml index 7db544ca..aafcfbcf 100644 --- a/src/syntax.ml +++ b/src/syntax.ml @@ -1,7 +1,10 @@ let ( let* ) o f = match o with Ok v -> f v | Error _ as e -> e let ( let+ ) o f = match o with Ok v -> Ok (f v) | Error _ as e -> e -(* TODO use polymorphic variant for errors *) +(* TODO better errors + use polymorphic variant for errors + use GANA error codes: + https://git.gnunet.org/gana.git/tree/gnu-taler-error-codes/registry.rec *) let unwrap_err_msg o = match o with Error (`Msg e) -> Error e | Ok v -> Ok v let unwrap_err_caqti o = diff --git a/src/time.mli b/src/time.mli index ca3322c4..7955f822 100644 --- a/src/time.mli +++ b/src/time.mli @@ -50,7 +50,6 @@ module Timestamp : sig val of_absolute : TimeAbsolute.t -> t val of_ptime : Ptime.t -> t - (* TODO add pp *) (* - *) val bin : t Bin.t val caqti : t Caqti_type.t