fix check for replay attack + revoke 1sec in the future

This commit is contained in:
swrup 2026-02-26 17:52:30 +01:00
parent a3880e5377
commit d9cea19add
4 changed files with 66 additions and 46 deletions

View file

@ -257,10 +257,10 @@ let insert_global_fees =
let find_wire =
let req =
Caqti_type.(payto_uri ->? exchange_wire_account)
Caqti_type.(payto_uri ->? t3 exchange_wire_account bool time)
"SELECT payto_uri, conversion_url, debit_restrictions::TEXT, \
credit_restrictions::TEXT, master_sig, bank_label, priority FROM \
wire_accounts WHERE payto_uri=$1"
credit_restrictions::TEXT, master_sig, bank_label, priority, is_active, \
last_change FROM wire_accounts WHERE payto_uri=$1"
in
fun (module Conn : CONN) ~payto_uri -> Conn.find_opt req payto_uri