aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-11-04 19:28:52 +0100
committerChristian Grothoff <christian@grothoff.org>2024-11-05 10:37:38 +0100
commit7adadeb4602023dec3da56d1e1be7ffac191a1bc (patch)
tree34e2ab0c7d2e0705b8c94dd6a638758293d4a07e
parent844a138069fbefe3b79ee334dbf93416021a147a (diff)
more bugfixes
-rw-r--r--src/exchangedb/exchange_do_age_withdraw.sql8
-rw-r--r--src/exchangedb/exchange_do_insert_kyc_attributes.sql5
2 files changed, 8 insertions, 5 deletions
diff --git a/src/exchangedb/exchange_do_age_withdraw.sql b/src/exchangedb/exchange_do_age_withdraw.sql
index 89a291445..058531feb 100644
--- a/src/exchangedb/exchange_do_age_withdraw.sql
+++ b/src/exchangedb/exchange_do_age_withdraw.sql
@@ -53,8 +53,8 @@ SELECT current_balance
,birthday
,gc_date
INTO reserve
- FROM exchange.reserves
- WHERE reserves.reserve_pub=rpub;
+ FROM reserves
+ WHERE reserve_pub=rpub;
IF NOT FOUND
THEN
@@ -124,10 +124,10 @@ UPDATE reserves SET
gc_date=min_reserve_gc
,current_balance=balance
WHERE
- reserves.reserve_pub=rpub;
+ reserve_pub=rpub;
-- Write the commitment into the age-withdraw table
-INSERT INTO exchange.age_withdraw
+INSERT INTO age_withdraw
(h_commitment
,max_age
,amount_with_fee
diff --git a/src/exchangedb/exchange_do_insert_kyc_attributes.sql b/src/exchangedb/exchange_do_insert_kyc_attributes.sql
index 5b086dd3e..8615d7bc5 100644
--- a/src/exchangedb/exchange_do_insert_kyc_attributes.sql
+++ b/src/exchangedb/exchange_do_insert_kyc_attributes.sql
@@ -110,7 +110,10 @@ UPDATE reserves
WHERE (reserve_pub IN
(SELECT reserve_pub
FROM reserves_in
- WHERE wire_source_h_payto=in_h_payto) )
+ WHERE wire_source_h_payto IN
+ (SELECT wire_source_h_payto
+ FROM wire_targets
+ WHERE h_normalized_payto=in_h_payto) ) )
-- The next 3 clauses primarily serve to limit
-- unnecessary updates for reserves we do not
-- care about anymore.