commit 481943e780bc49e355570feb884f67c5efba0e3c parent d96a9b99d47383308cf8ea8cac5cb9e7705bc7cf Author: Christian Grothoff <christian@grothoff.org> Date: Thu, 5 Sep 2024 11:58:01 +0200 fix handling where account_pub is NULL Diffstat:
| M | src/exchangedb/exchange_do_trigger_kyc_rule_for_account.sql | | | 7 | +------ |
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/src/exchangedb/exchange_do_trigger_kyc_rule_for_account.sql b/src/exchangedb/exchange_do_trigger_kyc_rule_for_account.sql @@ -49,12 +49,7 @@ THEN -- Extract details, determine if KYC auth matches. my_access_token = my_rec.access_token; my_account_pub = my_rec.target_pub; - IF in_merchant_pub IS NULL - THEN - out_bad_kyc_auth = FALSE; - ELSE - out_bad_kyc_auth = (my_account_pub = in_merchant_pub); - END IF; + out_bad_kyc_auth = COALESCE ((my_account_pub = in_merchant_pub), TRUE); ELSE -- No constraint on merchant_pub, just create -- the wire_target.