libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit 194031980e20f931803f58f005255cbc9fab4a59
parent 3b1be04328f24b4f9719e3df978ccfe5311b3e2e
Author: Antoine A <>
Date:   Mon,  9 Dec 2024 12:32:07 +0100

bank: add missing receiver-name to sender_wire and refactor payto config ctx

Diffstat:
Mbank/src/main/kotlin/tech/libeufin/bank/Config.kt | 2+-
Mbank/src/main/kotlin/tech/libeufin/bank/api/CoreBankApi.kt | 13++++++-------
Mbank/src/main/kotlin/tech/libeufin/bank/api/RevenueApi.kt | 4++--
Mbank/src/main/kotlin/tech/libeufin/bank/api/WireGatewayApi.kt | 14+++++++-------
Mbank/src/main/kotlin/tech/libeufin/bank/cli/Serve.kt | 2+-
Mbank/src/main/kotlin/tech/libeufin/bank/db/AccountDAO.kt | 23+++++++++++------------
Mbank/src/main/kotlin/tech/libeufin/bank/db/Database.kt | 9+++++++--
Mbank/src/main/kotlin/tech/libeufin/bank/db/ExchangeDAO.kt | 22+++++++++-------------
Mbank/src/main/kotlin/tech/libeufin/bank/db/TransactionDAO.kt | 18++++++++----------
Mbank/src/main/kotlin/tech/libeufin/bank/db/WithdrawalDAO.kt | 4+++-
Mbank/src/main/kotlin/tech/libeufin/bank/helpers.kt | 5++---
Mbank/src/test/kotlin/helpers.kt | 3---
12 files changed, 57 insertions(+), 62 deletions(-)

diff --git a/bank/src/main/kotlin/tech/libeufin/bank/Config.kt b/bank/src/main/kotlin/tech/libeufin/bank/Config.kt @@ -88,7 +88,7 @@ fun bankConfig(configPath: Path?): BankConfig = BANK_CONFIG_SOURCE.fromFile(conf /** Run [lambda] with access to a database conn pool */ suspend fun BankConfig.withDb(lambda: suspend (Database, BankConfig) -> Unit) { - Database(dbCfg, regionalCurrency, fiatCurrency).use { lambda(it, this) } + Database(dbCfg, regionalCurrency, fiatCurrency, payto).use { lambda(it, this) } } private fun TalerConfig.loadBankConfig(): BankConfig = section("libeufin-bank").run { diff --git a/bank/src/main/kotlin/tech/libeufin/bank/api/CoreBankApi.kt b/bank/src/main/kotlin/tech/libeufin/bank/api/CoreBankApi.kt @@ -225,7 +225,6 @@ suspend fun createAccount( else TalerAmount(0, 0, cfg.regionalCurrency), tanChannel = req.tan_channel, checkPaytoIdempotent = req.payto_uri != null, - ctx = cfg.payto, minCashout = req.min_cashout, pwCrypto = cfg.pwCrypto ) @@ -417,7 +416,7 @@ private fun Routing.coreBankAccountsApi(db: Database, cfg: BankConfig) { } get("/public-accounts") { val params = AccountParams.extract(call.request.queryParameters) - val publicAccounts = db.account.pagePublic(params, cfg.payto) + val publicAccounts = db.account.pagePublic(params) if (publicAccounts.isEmpty()) { call.respond(HttpStatusCode.NoContent) } else { @@ -427,7 +426,7 @@ private fun Routing.coreBankAccountsApi(db: Database, cfg: BankConfig) { authAdmin(db, cfg.pwCrypto, TokenLogicalScope.readonly, cfg.basicAuthCompat) { get("/accounts") { val params = AccountParams.extract(call.request.queryParameters) - val accounts = db.account.pageAdmin(params, cfg.payto) + val accounts = db.account.pageAdmin(params) if (accounts.isEmpty()) { call.respond(HttpStatusCode.NoContent) } else { @@ -437,7 +436,7 @@ private fun Routing.coreBankAccountsApi(db: Database, cfg: BankConfig) { } auth(db, cfg.pwCrypto, TokenLogicalScope.readonly, cfg.basicAuthCompat, allowAdmin = true) { get("/accounts/{USERNAME}") { - val account = db.account.get(call.username, cfg.payto) ?: throw unknownAccount(call.username) + val account = db.account.get(call.username) ?: throw unknownAccount(call.username) call.respond(account) } } @@ -447,10 +446,10 @@ private fun Routing.coreBankTransactionsApi(db: Database, cfg: BankConfig) { auth(db, cfg.pwCrypto, TokenLogicalScope.readonly, cfg.basicAuthCompat, allowAdmin = true) { get("/accounts/{USERNAME}/transactions") { val params = HistoryParams.extract(call.request.queryParameters) - val bankAccount = call.bankInfo(db, cfg.payto) + val bankAccount = call.bankInfo(db) val history: List<BankAccountTransactionInfo> = - db.transaction.pollHistory(params, bankAccount.bankAccountId, cfg.payto) + db.transaction.pollHistory(params, bankAccount.bankAccountId) if (history.isEmpty()) { call.respond(HttpStatusCode.NoContent) } else { @@ -459,7 +458,7 @@ private fun Routing.coreBankTransactionsApi(db: Database, cfg: BankConfig) { } get("/accounts/{USERNAME}/transactions/{T_ID}") { val tId = call.longPath("T_ID") - val tx = db.transaction.get(tId, call.username, cfg.payto) ?: throw notFound( + val tx = db.transaction.get(tId, call.username) ?: throw notFound( "Bank transaction '$tId' not found", TalerErrorCode.BANK_TRANSACTION_NOT_FOUND ) diff --git a/bank/src/main/kotlin/tech/libeufin/bank/api/RevenueApi.kt b/bank/src/main/kotlin/tech/libeufin/bank/api/RevenueApi.kt @@ -40,8 +40,8 @@ fun Routing.revenueApi(db: Database, cfg: BankConfig) { auth(db, cfg.pwCrypto, TokenLogicalScope.revenue, cfg.basicAuthCompat) { get("/accounts/{USERNAME}/taler-revenue/history") { val params = HistoryParams.extract(call.request.queryParameters) - val bankAccount = call.bankInfo(db, cfg.payto) - val items = db.transaction.revenueHistory(params, bankAccount.bankAccountId, cfg.payto) + val bankAccount = call.bankInfo(db) + val items = db.transaction.revenueHistory(params, bankAccount.bankAccountId) if (items.isEmpty()) { call.respond(HttpStatusCode.NoContent) diff --git a/bank/src/main/kotlin/tech/libeufin/bank/api/WireGatewayApi.kt b/bank/src/main/kotlin/tech/libeufin/bank/api/WireGatewayApi.kt @@ -84,10 +84,10 @@ fun Routing.wireGatewayApi(db: Database, cfg: BankConfig) { auth(db, cfg.pwCrypto, TokenLogicalScope.readonly_wiregateway, cfg.basicAuthCompat) { suspend fun <T> ApplicationCall.historyEndpoint( reduce: (List<T>, String) -> Any, - dbLambda: suspend ExchangeDAO.(HistoryParams, Long, BankPaytoCtx) -> List<T> + dbLambda: suspend ExchangeDAO.(HistoryParams, Long) -> List<T> ) { val params = HistoryParams.extract(this.request.queryParameters) - val bankAccount = this.bankInfo(db, cfg.payto) + val bankAccount = this.bankInfo(db) if (!bankAccount.isTalerExchange) throw conflict( @@ -95,7 +95,7 @@ fun Routing.wireGatewayApi(db: Database, cfg: BankConfig) { TalerErrorCode.BANK_ACCOUNT_IS_NOT_EXCHANGE ) - val items = db.exchange.dbLambda(params, bankAccount.bankAccountId, cfg.payto) + val items = db.exchange.dbLambda(params, bankAccount.bankAccountId) if (items.isEmpty()) { this.respond(HttpStatusCode.NoContent) @@ -111,7 +111,7 @@ fun Routing.wireGatewayApi(db: Database, cfg: BankConfig) { } get("/accounts/{USERNAME}/taler-wire-gateway/transfers") { val params = TransferParams.extract(call.request.queryParameters) - val bankAccount = call.bankInfo(db, cfg.payto) + val bankAccount = call.bankInfo(db) if (!bankAccount.isTalerExchange) throw conflict( "${call.username} is not an exchange account.", @@ -121,7 +121,7 @@ fun Routing.wireGatewayApi(db: Database, cfg: BankConfig) { if (params.status != null && params.status != TransferStatusState.success && params.status != TransferStatusState.permanent_failure) { call.respond(HttpStatusCode.NoContent) } else { - val items = db.exchange.pageTransfer(params.page, bankAccount.bankAccountId, params.status, cfg.payto) + val items = db.exchange.pageTransfer(params.page, bankAccount.bankAccountId, params.status) if (items.isEmpty()) { call.respond(HttpStatusCode.NoContent) @@ -131,7 +131,7 @@ fun Routing.wireGatewayApi(db: Database, cfg: BankConfig) { } } get("/accounts/{USERNAME}/taler-wire-gateway/transfers/{ROW_ID}") { - val bankAccount = call.bankInfo(db, cfg.payto) + val bankAccount = call.bankInfo(db) if (!bankAccount.isTalerExchange) throw conflict( "${call.username} is not an exchange account.", @@ -139,7 +139,7 @@ fun Routing.wireGatewayApi(db: Database, cfg: BankConfig) { ) val txId = call.longPath("ROW_ID") - val transfer = db.exchange.getTransfer(bankAccount.bankAccountId, txId, cfg.payto) ?: throw notFound( + val transfer = db.exchange.getTransfer(bankAccount.bankAccountId, txId) ?: throw notFound( "Transfer '$txId' not found", TalerErrorCode.BANK_TRANSACTION_NOT_FOUND ) diff --git a/bank/src/main/kotlin/tech/libeufin/bank/cli/Serve.kt b/bank/src/main/kotlin/tech/libeufin/bank/cli/Serve.kt @@ -42,7 +42,7 @@ class Serve: CliktCommand("serve") { bankConfig(common.config).withDb { db, cfg -> if (cfg.allowConversion) { logger.info("Ensure exchange account exists") - val info = db.account.bankInfo("exchange", cfg.payto) + val info = db.account.bankInfo("exchange") if (info == null) { throw Exception("Exchange account missing: an exchange account named 'exchange' is required for conversion to be enabled") } else if (!info.isTalerExchange) { diff --git a/bank/src/main/kotlin/tech/libeufin/bank/db/AccountDAO.kt b/bank/src/main/kotlin/tech/libeufin/bank/db/AccountDAO.kt @@ -52,7 +52,6 @@ class AccountDAO(private val db: Database) { tanChannel: TanChannel?, // Whether to check [internalPaytoUri] for idempotency checkPaytoIdempotent: Boolean, - ctx: BankPaytoCtx, pwCrypto: PwCrypto ): AccountCreationResult = db.serializableTransaction { conn -> val timestamp = Instant.now().micros() @@ -94,7 +93,7 @@ class AccountDAO(private val db: Database) { oneOrNull { Pair( pwCrypto.checkpw(password, it.getString(1)).match && it.getBoolean(2), - it.getBankPayto("internal_payto", "name", ctx) + it.getBankPayto("internal_payto", "name", db.ctx) ) } } @@ -185,12 +184,12 @@ class AccountDAO(private val db: Database) { conn.rollback() AccountCreationResult.BonusBalanceInsufficient } - else -> AccountCreationResult.Success(internalPayto.bank(name, ctx)) + else -> AccountCreationResult.Success(internalPayto.bank(name, db.ctx)) } } } } else { - AccountCreationResult.Success(internalPayto.bank(name, ctx)) + AccountCreationResult.Success(internalPayto.bank(name, db.ctx)) } } } @@ -496,7 +495,7 @@ class AccountDAO(private val db: Database) { } /** Get bank info of account [username] */ - suspend fun bankInfo(username: String, ctx: BankPaytoCtx): BankInfo? = db.serializable( + suspend fun bankInfo(username: String): BankInfo? = db.serializable( """ SELECT bank_account_id @@ -511,7 +510,7 @@ class AccountDAO(private val db: Database) { setString(1, username) oneOrNull { BankInfo( - payto = it.getBankPayto("internal_payto", "name", ctx), + payto = it.getBankPayto("internal_payto", "name", db.ctx), isTalerExchange = it.getBoolean("is_taler_exchange"), bankAccountId = it.getLong("bank_account_id") ) @@ -519,7 +518,7 @@ class AccountDAO(private val db: Database) { } /** Get data of account [username] */ - suspend fun get(username: String, ctx: BankPaytoCtx): AccountData? = db.serializable( + suspend fun get(username: String): AccountData? = db.serializable( """ SELECT name @@ -558,7 +557,7 @@ class AccountDAO(private val db: Database) { ), tan_channel = it.getOptEnum<TanChannel>("tan_channel"), cashout_payto_uri = it.getString("cashout_payto"), - payto_uri = it.getBankPayto("internal_payto", "name", ctx), + payto_uri = it.getBankPayto("internal_payto", "name", db.ctx), balance = Balance( amount = it.getAmount("balance", db.bankCurrency), credit_debit_indicator = @@ -579,7 +578,7 @@ class AccountDAO(private val db: Database) { } /** Get a page of all public accounts */ - suspend fun pagePublic(params: AccountParams, ctx: BankPaytoCtx): List<PublicAccount> + suspend fun pagePublic(params: AccountParams): List<PublicAccount> = db.page( params.page, "bank_account_id", @@ -611,7 +610,7 @@ class AccountDAO(private val db: Database) { PublicAccount( username = it.getString("username"), row_id = it.getLong("bank_account_id"), - payto_uri = it.getBankPayto("internal_payto", "name", ctx), + payto_uri = it.getBankPayto("internal_payto", "name", db.ctx), balance = Balance( amount = it.getAmount("balance", db.bankCurrency), credit_debit_indicator = if (it.getBoolean("has_debt")) { @@ -625,7 +624,7 @@ class AccountDAO(private val db: Database) { } /** Get a page of accounts */ - suspend fun pageAdmin(params: AccountParams, ctx: BankPaytoCtx): List<AccountMinimalData> + suspend fun pageAdmin(params: AccountParams): List<AccountMinimalData> = db.page( params.page, "bank_account_id", @@ -678,7 +677,7 @@ class AccountDAO(private val db: Database) { min_cashout = it.getOptAmount("min_cashout", db.bankCurrency), is_public = it.getBoolean("is_public"), is_taler_exchange = it.getBoolean("is_taler_exchange"), - payto_uri = it.getBankPayto("internal_payto", "name", ctx), + payto_uri = it.getBankPayto("internal_payto", "name", db.ctx), status = it.getEnum("status"), is_locked = it.getInt("token_creation_counter") >= MAX_TOKEN_CREATION_ATTEMPTS ) diff --git a/bank/src/main/kotlin/tech/libeufin/bank/db/Database.kt b/bank/src/main/kotlin/tech/libeufin/bank/db/Database.kt @@ -24,13 +24,18 @@ import org.slf4j.Logger import org.slf4j.LoggerFactory import tech.libeufin.bank.* import tech.libeufin.common.db.* -import tech.libeufin.common.internalServerError +import tech.libeufin.common.* import java.util.* import java.util.concurrent.ConcurrentHashMap private val logger: Logger = LoggerFactory.getLogger("libeufin-bank-db") -class Database(dbConfig: DatabaseConfig, internal val bankCurrency: String, internal val fiatCurrency: String?): DbPool(dbConfig, "libeufin-bank") { +class Database( + dbConfig: DatabaseConfig, + internal val bankCurrency: String, + internal val fiatCurrency: String?, + internal val ctx: BankPaytoCtx +): DbPool(dbConfig, "libeufin-bank") { // DAOs val cashout = CashoutDAO(this) val withdrawal = WithdrawalDAO(this) diff --git a/bank/src/main/kotlin/tech/libeufin/bank/db/ExchangeDAO.kt b/bank/src/main/kotlin/tech/libeufin/bank/db/ExchangeDAO.kt @@ -28,8 +28,7 @@ class ExchangeDAO(private val db: Database) { /** Query [exchangeId] history of taler incoming transactions */ suspend fun incomingHistory( params: HistoryParams, - exchangeId: Long, - ctx: BankPaytoCtx + exchangeId: Long ): List<IncomingBankTransaction> = db.poolHistory(params, exchangeId, db::listenIncoming, """ SELECT @@ -53,14 +52,14 @@ class ExchangeDAO(private val db: Database) { row_id = it.getLong("bank_transaction_id"), date = it.getTalerTimestamp("transaction_date"), amount = it.getAmount("amount", db.bankCurrency), - debit_account = it.getBankPayto("debtor_payto", "debtor_name", ctx), + debit_account = it.getBankPayto("debtor_payto", "debtor_name", db.ctx), reserve_pub = EddsaPublicKey(it.getBytes("reserve_pub")), ) TalerIncomingType.kyc -> IncomingKycAuthTransaction( row_id = it.getLong("bank_transaction_id"), date = it.getTalerTimestamp("transaction_date"), amount = it.getAmount("amount", db.bankCurrency), - debit_account = it.getBankPayto("debtor_payto", "debtor_name", ctx), + debit_account = it.getBankPayto("debtor_payto", "debtor_name", db.ctx), account_pub = EddsaPublicKey(it.getBytes("account_pub")), ) TalerIncomingType.wad -> throw UnsupportedOperationException() @@ -70,8 +69,7 @@ class ExchangeDAO(private val db: Database) { /** Query [exchangeId] history of taler outgoing transactions */ suspend fun outgoingHistory( params: HistoryParams, - exchangeId: Long, - ctx: BankPaytoCtx + exchangeId: Long ): List<OutgoingTransaction> = db.poolHistory(params, exchangeId, db::listenOutgoing, """ SELECT @@ -93,7 +91,7 @@ class ExchangeDAO(private val db: Database) { row_id = it.getLong("bank_transaction_id"), date = it.getTalerTimestamp("transaction_date"), amount = it.getAmount("amount", db.bankCurrency), - credit_account = it.getBankPayto("creditor_payto", "creditor_name", ctx), + credit_account = it.getBankPayto("creditor_payto", "creditor_name", db.ctx), wtid = ShortHashCode(it.getBytes("wtid")), exchange_base_url = it.getString("exchange_base_url") ) @@ -163,8 +161,7 @@ class ExchangeDAO(private val db: Database) { /** Get status of transfer [txId] of account [exchangeId] */ suspend fun getTransfer( exchangeId: Long, - txId: Long, - ctx: BankPaytoCtx + txId: Long ): TransferStatus? = db.serializable( """ SELECT @@ -189,7 +186,7 @@ class ExchangeDAO(private val db: Database) { amount = it.getAmount("amount", db.bankCurrency), origin_exchange_url = it.getString("exchange_base_url"), wtid = ShortHashCode(it.getBytes("wtid")), - credit_account = it.getBankPayto("creditor_payto", null, ctx), + credit_account = it.getBankPayto("creditor_payto", null, db.ctx), timestamp = it.getTalerTimestamp("transfer_date"), ) } @@ -199,8 +196,7 @@ class ExchangeDAO(private val db: Database) { suspend fun pageTransfer( params: PageParams, exchangeId: Long, - status: TransferStatusState?, - ctx: BankPaytoCtx + status: TransferStatusState? ): List<TransferListStatus> = db.page( params, "transfer_operation_id", @@ -234,7 +230,7 @@ class ExchangeDAO(private val db: Database) { row_id = it.getLong("transfer_operation_id"), status = it.getEnum<TransferStatusState>("status"), amount = it.getAmount("amount", db.bankCurrency), - credit_account = it.getBankPayto("creditor_payto", null, ctx), + credit_account = it.getBankPayto("creditor_payto", null, db.ctx), timestamp = it.getTalerTimestamp("transfer_date"), ) } diff --git a/bank/src/main/kotlin/tech/libeufin/bank/db/TransactionDAO.kt b/bank/src/main/kotlin/tech/libeufin/bank/db/TransactionDAO.kt @@ -170,7 +170,7 @@ class TransactionDAO(private val db: Database) { } /** Get transaction [rowId] owned by [username] */ - suspend fun get(rowId: Long, username: String, ctx: BankPaytoCtx): BankAccountTransactionInfo? = db.serializable( + suspend fun get(rowId: Long, username: String): BankAccountTransactionInfo? = db.serializable( """ SELECT creditor_payto @@ -193,8 +193,8 @@ class TransactionDAO(private val db: Database) { setString(2, username) oneOrNull { BankAccountTransactionInfo( - creditor_payto_uri = it.getBankPayto("creditor_payto", "creditor_name", ctx), - debtor_payto_uri = it.getBankPayto("debtor_payto", "debtor_name", ctx), + creditor_payto_uri = it.getBankPayto("creditor_payto", "creditor_name", db.ctx), + debtor_payto_uri = it.getBankPayto("debtor_payto", "debtor_name", db.ctx), amount = it.getAmount("amount", db.bankCurrency), direction = it.getEnum("direction"), subject = it.getString("subject"), @@ -207,8 +207,7 @@ class TransactionDAO(private val db: Database) { /** Pool [accountId] transactions history */ suspend fun pollHistory( params: HistoryParams, - accountId: Long, - ctx: BankPaytoCtx + accountId: Long ): List<BankAccountTransactionInfo> { return db.poolHistory(params, accountId, db::listenBank, """ SELECT @@ -227,8 +226,8 @@ class TransactionDAO(private val db: Database) { BankAccountTransactionInfo( row_id = it.getLong("bank_transaction_id"), date = it.getTalerTimestamp("transaction_date"), - creditor_payto_uri = it.getBankPayto("creditor_payto", "creditor_name", ctx), - debtor_payto_uri = it.getBankPayto("debtor_payto", "debtor_name", ctx), + creditor_payto_uri = it.getBankPayto("creditor_payto", "creditor_name", db.ctx), + debtor_payto_uri = it.getBankPayto("debtor_payto", "debtor_name", db.ctx), amount = it.getAmount("amount", db.bankCurrency), subject = it.getString("subject"), direction = it.getEnum("direction") @@ -239,8 +238,7 @@ class TransactionDAO(private val db: Database) { /** Query [accountId] history of incoming transactions to its account */ suspend fun revenueHistory( params: HistoryParams, - accountId: Long, - ctx: BankPaytoCtx + accountId: Long ): List<RevenueIncomingBankTransaction> = db.poolHistory(params, accountId, db::listenRevenue, """ SELECT @@ -257,7 +255,7 @@ class TransactionDAO(private val db: Database) { row_id = it.getLong("bank_transaction_id"), date = it.getTalerTimestamp("transaction_date"), amount = it.getAmount("amount", db.bankCurrency), - debit_account = it.getBankPayto("debtor_payto", "debtor_name", ctx), + debit_account = it.getBankPayto("debtor_payto", "debtor_name", db.ctx), subject = it.getString("subject") ) } diff --git a/bank/src/main/kotlin/tech/libeufin/bank/db/WithdrawalDAO.kt b/bank/src/main/kotlin/tech/libeufin/bank/db/WithdrawalDAO.kt @@ -379,12 +379,14 @@ class WithdrawalDAO(private val db: Database) { ,aborted ,confirmation_done ,internal_payto + ,name ,reserve_pub ,selected_exchange_payto ,(max_amount).val as max_amount_val ,(max_amount).frac as max_amount_frac FROM taler_withdrawal_operations JOIN bank_accounts ON (wallet_bank_account=bank_account_id) + JOIN customers ON (owning_customer_id=customer_id) ,account_max_amount(bank_account_id, (?, ?)::taler_amount) AS max_amount WHERE withdrawal_uuid=? """ @@ -401,7 +403,7 @@ class WithdrawalDAO(private val db: Database) { selection_done = it.getBoolean("selection_done"), transfer_done = it.getBoolean("confirmation_done"), aborted = it.getBoolean("aborted"), - sender_wire = it.getString("internal_payto"), + sender_wire = it.getBankPayto("internal_payto", "name", db.ctx), confirm_transfer_url = null, suggested_exchange = null, selected_exchange_account = it.getString("selected_exchange_payto"), diff --git a/bank/src/main/kotlin/tech/libeufin/bank/helpers.kt b/bank/src/main/kotlin/tech/libeufin/bank/helpers.kt @@ -40,8 +40,8 @@ import tech.libeufin.common.api.intercept import java.util.* /** Retrieve the bank account info for the selected username*/ -suspend fun ApplicationCall.bankInfo(db: Database, ctx: BankPaytoCtx): BankInfo - = db.account.bankInfo(username, ctx) ?: throw unknownAccount(username) +suspend fun ApplicationCall.bankInfo(db: Database): BankInfo + = db.account.bankInfo(username) ?: throw unknownAccount(username) /** * Builds the taler://withdraw-URI. Such URI will serve the requests @@ -106,7 +106,6 @@ suspend fun createAdminAccount(db: Database, cfg: BankConfig, pw: String? = null cashoutPayto = null, tanChannel = null, minCashout = null, - ctx = cfg.payto, pwCrypto = cfg.pwCrypto ) } diff --git a/bank/src/test/kotlin/helpers.kt b/bank/src/test/kotlin/helpers.kt @@ -97,7 +97,6 @@ fun bankSetup( cashoutPayto = null, tanChannel = null, minCashout = null, - ctx = cfg.payto, pwCrypto = cfg.pwCrypto )) assertIs<AccountCreationResult.Success>(db.account.create( @@ -115,7 +114,6 @@ fun bankSetup( cashoutPayto = null, tanChannel = null, minCashout = null, - ctx = cfg.payto, pwCrypto = cfg.pwCrypto )) assertIs<AccountCreationResult.Success>(db.account.create( @@ -133,7 +131,6 @@ fun bankSetup( cashoutPayto = null, tanChannel = null, minCashout = null, - ctx = cfg.payto, pwCrypto = cfg.pwCrypto )) // Create admin account