From 20443ad544809420cc371cff0ef4bd30b3fc7a67 Mon Sep 17 00:00:00 2001 From: dankito Date: Tue, 28 Apr 2020 18:17:47 +0200 Subject: [PATCH] Fixed that account either is not instantiated when adding a new account and enterTan() callback method gets called (curious how this could ever happen anyway) or after restoring customer --- .../kotlin/net/dankito/banking/fints4javaBankingClient.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fints4javaBankingClient/src/main/kotlin/net/dankito/banking/fints4javaBankingClient.kt b/fints4javaBankingClient/src/main/kotlin/net/dankito/banking/fints4javaBankingClient.kt index 97f4f208..ae1623a9 100644 --- a/fints4javaBankingClient/src/main/kotlin/net/dankito/banking/fints4javaBankingClient.kt +++ b/fints4javaBankingClient/src/main/kotlin/net/dankito/banking/fints4javaBankingClient.kt @@ -54,7 +54,7 @@ open class fints4javaBankingClient( protected val customer = CustomerData(customerId, pin) - protected lateinit var account: Account + protected var account: Account = mapper.mapAccount(customer, bank) // temporary save temp account, we update with data from server response like BankAccounts later protected val client = FinTsClientForCustomer(bank, customer, webClient, base64Service, threadPool, object : FinTsClientCallback { @@ -135,6 +135,8 @@ open class fints4javaBankingClient( deserializedCustomer?.let { mapper.updateCustomer(customer, deserializedCustomer) + + account = mapper.mapAccount(customer, bank) } }