This commit is contained in:
parent
ac0b346877
commit
6c527c1dcc
1 changed files with 6 additions and 3 deletions
|
|
@ -15,6 +15,7 @@ module Caqti_type = struct
|
||||||
custom
|
custom
|
||||||
~encode:(fun amount -> Ok (amount.value, amount.fraction))
|
~encode:(fun amount -> Ok (amount.value, amount.fraction))
|
||||||
~decode:(fun (value, fraction) ->
|
~decode:(fun (value, fraction) ->
|
||||||
|
Fmt.epr "amount decode {value = %Ld; fract = %ld}" value fraction;
|
||||||
Amount.make ~sign:None ~currency:Config.currency ~value ~fraction)
|
Amount.make ~sign:None ~currency:Config.currency ~value ~fraction)
|
||||||
(t2 int64 int32)
|
(t2 int64 int32)
|
||||||
|
|
||||||
|
|
@ -110,9 +111,11 @@ let lookup_denomination_key =
|
||||||
Caqti_type.(
|
Caqti_type.(
|
||||||
denomination_hash
|
denomination_hash
|
||||||
->? t10 time time time time amount amount amount amount amount age_mask)
|
->? t10 time time time time amount amount amount amount amount age_mask)
|
||||||
"SELECT valid_from, expire_withdraw, expire_deposit, expire_legal, coin, \
|
"SELECT valid_from, expire_withdraw, expire_deposit, expire_legal, \
|
||||||
fee_withdraw, fee_deposit, fee_refresh, fee_refund, age_mask FROM \
|
coin::taler_amount, fee_withdraw::taler_amount, \
|
||||||
denominations WHERE denom_pub_hash=$1"
|
fee_deposit::taler_amount, fee_refresh::taler_amount, \
|
||||||
|
fee_refund::taler_amount, age_mask FROM denominations WHERE \
|
||||||
|
denom_pub_hash=$1"
|
||||||
in
|
in
|
||||||
fun (module Conn : CONN) (h_denom_pub : DenominationHash.t) ->
|
fun (module Conn : CONN) (h_denom_pub : DenominationHash.t) ->
|
||||||
Conn.find_opt lookup_denomination_key h_denom_pub
|
Conn.find_opt lookup_denomination_key h_denom_pub
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue