This commit is contained in:
parent
ef0a51c166
commit
55554e7328
2 changed files with 43 additions and 16 deletions
|
|
@ -733,10 +733,10 @@ end
|
|||
module AmlOfficerSetup = struct
|
||||
type t = {
|
||||
officer_pub: EddsaPublicKey.t;
|
||||
master_sig: MasterAmlOfficerStatus.t;
|
||||
officer_name: string;
|
||||
is_active: bool;
|
||||
read_only: bool;
|
||||
master_sig: MasterAmlOfficerStatus.t;
|
||||
change_date: Timestamp.t;
|
||||
}
|
||||
|
||||
|
|
|
|||
57
src/pg.ml
57
src/pg.ml
|
|
@ -308,6 +308,46 @@ module Caqti_type = struct
|
|||
})
|
||||
Caqti_type.(t6 b32 string string time amount master_sig)
|
||||
|
||||
let aml_officer_setup =
|
||||
let master_sig = Bin_sig.MasterAmlOfficerStatus.caqti in
|
||||
Caqti_type.custom
|
||||
~encode:(fun
|
||||
AmlOfficerSetup.
|
||||
{
|
||||
officer_pub;
|
||||
master_sig;
|
||||
officer_name;
|
||||
is_active;
|
||||
read_only;
|
||||
change_date;
|
||||
}
|
||||
->
|
||||
Ok
|
||||
( officer_pub,
|
||||
master_sig,
|
||||
officer_name,
|
||||
is_active,
|
||||
read_only,
|
||||
change_date ))
|
||||
~decode:(fun
|
||||
( officer_pub,
|
||||
master_sig,
|
||||
officer_name,
|
||||
is_active,
|
||||
read_only,
|
||||
change_date )
|
||||
->
|
||||
Ok
|
||||
{
|
||||
officer_pub;
|
||||
master_sig;
|
||||
officer_name;
|
||||
is_active;
|
||||
read_only;
|
||||
change_date;
|
||||
})
|
||||
Caqti_type.(t6 eddsa_pub master_sig string bool bool time)
|
||||
|
||||
include Caqti_request.Infix
|
||||
end
|
||||
|
||||
|
|
@ -550,24 +590,11 @@ let insert_drain_profit =
|
|||
|
||||
let insert_aml_officer =
|
||||
let exchange_do_insert_aml_officer =
|
||||
let master_sig = Bin_sig.MasterAmlOfficerStatus.caqti in
|
||||
Caqti_type.(t6 eddsa_pub master_sig string bool bool time ->! time)
|
||||
Caqti_type.(aml_officer_setup ->! time)
|
||||
"SELECT out_last_change FROM exchange_do_insert_aml_officer ($1, $2, $3, \
|
||||
$4, $5, $6)"
|
||||
in
|
||||
fun (module Conn : CONN)
|
||||
AmlOfficerSetup.
|
||||
{
|
||||
officer_pub;
|
||||
officer_name;
|
||||
is_active;
|
||||
read_only;
|
||||
master_sig;
|
||||
change_date;
|
||||
}
|
||||
->
|
||||
Conn.find exchange_do_insert_aml_officer
|
||||
(officer_pub, master_sig, officer_name, is_active, read_only, change_date)
|
||||
fun (module Conn : CONN) v -> Conn.find exchange_do_insert_aml_officer v
|
||||
|
||||
let insert_partner =
|
||||
let insert_partner =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue