exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit 3c2de7a846fdc4f845159987189bc5cfa30b4b76
parent 1c53b027665639f3d6cde4edb0e76472040d1a3c
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Thu, 12 Jun 2025 12:55:10 +0200

fix confusion between normalized and non-normalized payto hashes (for #10093)

Diffstat:
Msrc/exchangedb/exchange_do_get_kyc_rules.sql | 12+++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/exchangedb/exchange_do_get_kyc_rules.sql b/src/exchangedb/exchange_do_get_kyc_rules.sql @@ -31,8 +31,11 @@ BEGIN IF in_merchant_pub IS NOT NULL THEN PERFORM FROM reserves_in - WHERE wire_source_h_payto = in_h_payto - AND reserve_pub=in_merchant_pub; + WHERE reserve_pub=in_merchant_pub + AND wire_source_h_payto IN + (SELECT wire_target_h_payto + FROM wire_targets + WHERE h_normalized_payto = in_h_payto); my_found = FOUND; ELSE my_found = FALSE; @@ -46,7 +49,10 @@ BEGIN SELECT reserve_pub INTO out_reserve_pub FROM reserves_in - WHERE wire_source_h_payto = in_h_payto + WHERE wire_source_h_payto IN + (SELECT wire_target_h_payto + FROM wire_targets + WHERE h_normalized_payto = in_h_payto) ORDER BY execution_date DESC LIMIT 1; END IF;