caqti amount: shorter syntax for output param

This commit is contained in:
swrup 2025-12-07 16:39:12 +01:00
parent 32fa5b1fc3
commit b64a91207c

View file

@ -7,7 +7,10 @@
GNU Taler db-events?
it seems caqti/pgx does not support it *)
module type CONN = Caqti_miou.CONNECTION
open Crypto
open Bin_type
module Caqti_type = struct
include Caqti_type
@ -31,7 +34,6 @@ module Caqti_type = struct
include struct
(* alias for hash *)
open Bin_type
let fullpayto_hash = FullPaytoHash.caqti
let nomalizaedpayto_hash = NormalizedPaytoHash.caqti
@ -49,10 +51,6 @@ module Caqti_type = struct
include Caqti_request.Infix
end
module type CONN = Caqti_miou.CONNECTION
open Bin_type
let preflight =
let l =
List.map
@ -107,10 +105,8 @@ let lookup_denomination_key =
denomination_hash
->? t10 time time time time amount amount amount amount amount age_mask)
"SELECT valid_from, expire_withdraw, expire_deposit, expire_legal, \
(coin).val, (coin).frac, (fee_withdraw).val, (fee_withdraw).frac, \
(fee_deposit).val, (fee_deposit).frac, (fee_refresh).val, \
(fee_refresh).frac, (fee_refund).val, (fee_refund).frac, age_mask FROM \
denominations WHERE denom_pub_hash=$1"
(coin).*, (fee_withdraw).*, (fee_deposit).*, (fee_refresh).*, \
(fee_refund).*, age_mask FROM denominations WHERE denom_pub_hash=$1"
in
fun (module Conn : CONN) (h_denom_pub : DenominationHash.t) ->
Conn.find_opt lookup_denomination_key h_denom_pub