summaryrefslogtreecommitdiff
path: root/bank/src/main/kotlin/tech/libeufin/bank/Main.kt
diff options
context:
space:
mode:
Diffstat (limited to 'bank/src/main/kotlin/tech/libeufin/bank/Main.kt')
-rw-r--r--bank/src/main/kotlin/tech/libeufin/bank/Main.kt3
1 files changed, 1 insertions, 2 deletions
diff --git a/bank/src/main/kotlin/tech/libeufin/bank/Main.kt b/bank/src/main/kotlin/tech/libeufin/bank/Main.kt
index db2e6d8d..48c1e082 100644
--- a/bank/src/main/kotlin/tech/libeufin/bank/Main.kt
+++ b/bank/src/main/kotlin/tech/libeufin/bank/Main.kt
@@ -484,8 +484,7 @@ class CreateAccount : CliktCommand(
)
}
req?.let {
- val result = createAccount(db, ctx, req, true)
- when (result) {
+ when (val result = createAccount(db, ctx, req, true)) {
AccountCreationResult.BonusBalanceInsufficient ->
throw Exception("Insufficient admin funds to grant bonus")
AccountCreationResult.LoginReuse ->