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

This commit is contained in:
dankito 2020-04-28 18:17:47 +02:00
parent e2b957e50e
commit 20443ad544
1 changed files with 3 additions and 1 deletions

View File

@ -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)
}
}