exchange

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

commit 8af4ecf0ab71cb4c4bfc56ddeefe5700f4737e26
parent 6abde755e5424a381d7e44c73d8e8268b664b569
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 30 Mar 2025 10:21:07 +0200

set AML_INVESTIATON_STATE in TOPS deposit trigger

Diffstat:
Msrc/exchangedb/tops-0001.sql | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/src/exchangedb/tops-0001.sql b/src/exchangedb/tops-0001.sql @@ -92,6 +92,7 @@ DECLARE my_last_month taler_amount; -- sum of deposits this month my_old_rules RECORD; my_properties TEXT; + my_investigate_property JSONB; my_measure_name TEXT; my_rules TEXT; BEGIN @@ -173,6 +174,16 @@ BEGIN my_properties = my_old_rules.jproperties; my_measure_name = my_old_rules.new_measure_name; my_rules = my_old_rules.jnew_rules; + my_investigate_property = json_object(ARRAY['AML_INVESTIGATION_STATE', + 'AML_TRIGGER'], + ARRAY['INVESTIATION_PENDING', + 'DEPOSIT_ANOMALY']); + IF my_properties IS NULL + THEN + my_properties = my_investigate_property::TEXT; + ELSE + my_properties = (my_properties::JSONB || my_investigate_property)::TEXT; + END IF; -- Note: here we could in theory manipulate my_properties, -- say to set a note as to why the investigation was started.