exchange

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

commit 20e19b9dd884f3df6eb4ab6a4c2e495ffb7a64c2
parent d9fdf50e7263eefa4425e746cfb6a39f66e77ac4
Author: Florian Dold <dold@taler.net>
Date:   Tue, 28 Jul 2026 12:29:17 +0200

exchangedb: tolerate NULL jnew_rules when building AML program input

A NULL rule set means the account is on the exchange's default rules, so
AML programs that requested "current_rules" were invoked without it and
failed, freezing the account via their fallback measure.

Diffstat:
Msrc/exchangedb/account_history.c | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/exchangedb/account_history.c b/src/exchangedb/account_history.c @@ -271,6 +271,15 @@ TALER_EXCHANGEDB_current_rule_builder (void *cls) hbc->is_wallet); break; case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: + if (NULL == jlrs) + { + /* A NULL rule set means the account is on the exchange's default + rules (see exchange_do_insert_successor_measure), not that it has + no rules at all. Without this AML programs would be run without + "current_rules" and fail. */ + jlrs = TALER_KYCLOGIC_get_default_legi_rules ( + hbc->is_wallet); + } break; } return jlrs;