commit f683ca49e99208166789a108dcab299028332cc7
parent eadc614c409e916889f85625fe985ba511c238f7
Author: MS <ms@taler.net>
Date: Mon, 2 Oct 2023 16:24:19 +0200
Storing normalized admin payto URI
Diffstat:
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/bank/src/main/kotlin/tech/libeufin/bank/helpers.kt b/bank/src/main/kotlin/tech/libeufin/bank/helpers.kt
@@ -424,9 +424,14 @@ fun maybeCreateAdminAccount(db: Database, ctx: BankApplicationContext): Boolean
if (maybeAdminBankAccount == null) {
logger.info("Creating admin bank account")
val adminMaxDebtObj = ctx.defaultAdminDebtLimit
+ val adminInternalPayto = stripIbanPayto(genIbanPaytoUri())
+ if (adminInternalPayto == null) {
+ logger.error("Bank generated invalid payto URI for admin")
+ return false
+ }
val adminBankAccount = BankAccount(
hasDebt = false,
- internalPaytoUri = genIbanPaytoUri(),
+ internalPaytoUri = adminInternalPayto,
owningCustomerId = adminCustomerId,
isPublic = false,
isTalerExchange = false,