diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-02-13 16:00:37 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-02-13 16:00:37 +0100 |
commit | dc40f6c679a382ec8ca1ac90f584f821c6be6a33 (patch) | |
tree | 99f5179d86c754f1785a0c898e43cd41fef0f96d /src/exchangedb/exchange_do_insert_aml_decision.sql | |
parent | 3760d43097b8b72dbb7c45ab061aad669c36aefa (diff) | |
download | exchange-dc40f6c679a382ec8ca1ac90f584f821c6be6a33.tar.xz |
work on AML notification logic
Diffstat (limited to 'src/exchangedb/exchange_do_insert_aml_decision.sql')
-rw-r--r-- | src/exchangedb/exchange_do_insert_aml_decision.sql | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/exchangedb/exchange_do_insert_aml_decision.sql b/src/exchangedb/exchange_do_insert_aml_decision.sql index ef3e60048..0009ecb40 100644 --- a/src/exchangedb/exchange_do_insert_aml_decision.sql +++ b/src/exchangedb/exchange_do_insert_aml_decision.sql @@ -23,6 +23,7 @@ CREATE OR REPLACE FUNCTION exchange_do_insert_aml_decision( IN in_justification VARCHAR, IN in_decider_pub BYTEA, IN in_decider_sig BYTEA, + IN in_notify_s VARCHAR, OUT out_invalid_officer BOOLEAN, OUT out_last_date INT8) LANGUAGE plpgsql @@ -95,8 +96,25 @@ INSERT INTO exchange.aml_history ,in_decider_pub ,in_decider_sig); + +-- wake up taler-exchange-aggregator +IF 0 = in_new_status +THEN + INSERT INTO kyc_alerts + (h_payto + ,trigger_type) + VALUES + (in_h_payto,1); + + EXECUTE FORMAT ( + 'NOTIFY %s' + ,in_notify_s); + +END IF; + + END $$; -COMMENT ON FUNCTION exchange_do_insert_aml_decision(BYTEA, INT8, INT4, INT4, INT8, VARCHAR, BYTEA, BYTEA) +COMMENT ON FUNCTION exchange_do_insert_aml_decision(BYTEA, INT8, INT4, INT4, INT8, VARCHAR, BYTEA, BYTEA, VARCHAR) IS 'Checks whether the AML officer is eligible to make AML decisions and if so inserts the decision into the table'; |