aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/exchange_do_insert_kyc_attributes.sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchangedb/exchange_do_insert_kyc_attributes.sql')
-rw-r--r--src/exchangedb/exchange_do_insert_kyc_attributes.sql5
1 files changed, 4 insertions, 1 deletions
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.