+ wip clean keys.ml
This commit is contained in:
parent
07659222dc
commit
e19c6d60c2
7 changed files with 249 additions and 520 deletions
|
|
@ -88,7 +88,7 @@ let mk_keys ~db_conn (module Keys : Keys.S) ~last_issue_date =
|
|||
(* todo asset_type
|
||||
Type of the asset. "fiat", "crypto", "regional" or "stock". *)
|
||||
let asset_type = "xxx" in
|
||||
let* accounts = Pg.get_wire_accounts db_conn |> unwrap_err_caqti in
|
||||
let* accounts = Pg.get_wire_accounts db_conn () |> unwrap_err_caqti in
|
||||
let* wire_fees =
|
||||
(* todo
|
||||
where does wire_methods comes from? *)
|
||||
|
|
@ -111,13 +111,12 @@ let mk_keys ~db_conn (module Keys : Keys.S) ~last_issue_date =
|
|||
let wallet_balance_limit_without_kyc = None in
|
||||
let hard_limits = [] in
|
||||
let zero_limits = [] in
|
||||
let dn_l =
|
||||
(*Pg.get_denominations db_conn |> unwrap_err_caqti *)
|
||||
Keys.get_denominations ()
|
||||
|>
|
||||
let* dn_l =
|
||||
let+ l = Keys.denominations () in
|
||||
(* reverse chronological order *)
|
||||
List.sort (fun a b ->
|
||||
Stdlib.compare b.Denomination.stamp_start a.stamp_start)
|
||||
List.sort
|
||||
(fun a b -> Stdlib.compare b.Denomination.stamp_start a.stamp_start)
|
||||
l
|
||||
in
|
||||
let list_issue_date =
|
||||
match dn_l with
|
||||
|
|
@ -147,11 +146,9 @@ let mk_keys ~db_conn (module Keys : Keys.S) ~last_issue_date =
|
|||
List.map denomgroup_of_denomdata l
|
||||
in
|
||||
|
||||
let signkeys =
|
||||
(*
|
||||
let now = Ptime_clock.now () |> Option.some in
|
||||
let+ signkey_data_l = Pg.get_active_signkeys db_conn ~now |> unwrap_err_caqti in*)
|
||||
Keys.get_signkeys ()
|
||||
let* signkeys =
|
||||
let+ l = Keys.signkeys () in
|
||||
l
|
||||
|> List.sort (fun a b ->
|
||||
let open Signkey in
|
||||
Stdlib.compare b.stamp_start a.stamp_start)
|
||||
|
|
@ -176,9 +173,7 @@ let mk_keys ~db_conn (module Keys : Keys.S) ~last_issue_date =
|
|||
|> Hash.H64.hash
|
||||
in
|
||||
let open Signatures.ExchangeKeySet in
|
||||
sign_f
|
||||
~f:(Keys.sign_with_signkey ~pub:exchange_pub)
|
||||
R.{ list_issue_date; hc }
|
||||
sign_f ~f:(Keys.sign ~pub:exchange_pub) R.{ list_issue_date; hc }
|
||||
in
|
||||
|
||||
let recoup = (* TODO /recoup *) [] in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue