This commit is contained in:
parent
5eba5f2265
commit
690ad41b20
16 changed files with 318 additions and 307 deletions
|
|
@ -19,12 +19,31 @@ module Arg = struct
|
|||
include Arg
|
||||
|
||||
let timestamp =
|
||||
Arg.Conv.make ~docv:"timestamp argument" ~parser:Timestamp.of_string
|
||||
~pp:Timestamp.pp ()
|
||||
let parser s =
|
||||
match int_of_string_opt s with
|
||||
| None -> Error "not an int"
|
||||
| Some n -> Ok (Time.Timestamp.of_s (Int64.of_int n))
|
||||
in
|
||||
let pp fmt t =
|
||||
match Time.Timestamp.to_s t with
|
||||
| None -> Fmt.pf fmt "never"
|
||||
| Some s -> Fmt.pf fmt "%Ld" s
|
||||
in
|
||||
Arg.Conv.make ~docv:"timestamp argument" ~parser ~pp ()
|
||||
|
||||
let relative_time =
|
||||
Arg.Conv.make ~docv:"relative time argument"
|
||||
~parser:Timestamp.Span.of_string ~pp:Timestamp.Span.pp ()
|
||||
let parser s =
|
||||
match int_of_string_opt s with
|
||||
| None -> Error "not an int"
|
||||
| Some s -> Ok (Time.Relative.of_s (Int64.of_int s))
|
||||
in
|
||||
let pp fmt d =
|
||||
let t = Time.Timestamp.of_absolute Time.Absolute.(add zero d) in
|
||||
match Time.Timestamp.to_s t with
|
||||
| None -> Fmt.pf fmt "never"
|
||||
| Some s -> Fmt.pf fmt "%Ld" s
|
||||
in
|
||||
Arg.Conv.make ~docv:"relative time argument" ~parser ~pp ()
|
||||
|
||||
let b32 =
|
||||
let pp fmt v = Fmt.pf fmt "%s" (B32.encode v) in
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ let global_fees ~output ~master_key ~start_date ~end_date ~history_fee
|
|||
let master_sig =
|
||||
let open Bin_sig.GlobalFees in
|
||||
(* TODO KYC *)
|
||||
let kyc_timeout = None in
|
||||
let kyc_timeout = Time.Relative.forever in
|
||||
let kyc_fee = Amount.dummy_value in
|
||||
sign_f ~f:(EddsaSignature.sign ~key)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue