diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClient.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClient.kt index b91a18a7..211f5271 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClient.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClient.kt @@ -205,13 +205,6 @@ open class FinTsClient( open fun addAccountAsync(bank: BankData, customer: CustomerData, callback: (AddAccountResponse) -> Unit) { - GlobalScope.launch { - addAccount(bank, customer, callback) - } - } - - open fun addAccount(bank: BankData, customer: CustomerData, callback: (AddAccountResponse) -> Unit) { - val originalAreWeThatGentleToCloseDialogs = areWeThatGentleToCloseDialogs areWeThatGentleToCloseDialogs = false @@ -307,7 +300,7 @@ open class FinTsClient( val now = Date() val ninetyDaysAgo = Date(now.millisSinceEpoch - NinetyDaysMillis) - getTransactions(GetTransactionsParameter(account.supportsFeature(AccountFeature.RetrieveBalance), ninetyDaysAgo, abortIfTanIsRequired = true), bank, customer, account) { response -> + getTransactionsAsync(GetTransactionsParameter(account.supportsFeature(AccountFeature.RetrieveBalance), ninetyDaysAgo, abortIfTanIsRequired = true), bank, customer, account) { response -> account.triedToRetrieveTransactionsOfLast90DaysWithoutTan = true if (response.isSuccessful) { @@ -324,14 +317,6 @@ open class FinTsClient( open fun getTransactionsAsync(parameter: GetTransactionsParameter, bank: BankData, customer: CustomerData, account: AccountData, callback: (GetTransactionsResponse) -> Unit) { - GlobalScope.launch { - getTransactions(parameter, bank, customer, account, callback) - } - } - - open fun getTransactions(parameter: GetTransactionsParameter, bank: BankData, - customer: CustomerData, account: AccountData, callback: (GetTransactionsResponse) -> Unit) { - val dialogContext = DialogContext(bank, customer, product) initDialog(dialogContext) { initDialogResponse -> @@ -464,14 +449,6 @@ open class FinTsClient( open fun doBankTransferAsync(bankTransferData: BankTransferData, bank: BankData, customer: CustomerData, account: AccountData, callback: (FinTsClientResponse) -> Unit) { - GlobalScope.launch { - doBankTransfer(bankTransferData, bank, customer, account, callback) - } - } - - open fun doBankTransfer(bankTransferData: BankTransferData, bank: BankData, - customer: CustomerData, account: AccountData, callback: (FinTsClientResponse) -> Unit) { - sendMessageAndHandleResponse(bank, customer, true, { dialogContext -> messageBuilder.createBankTransferMessage(bankTransferData, account, dialogContext) }) { response -> diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClientForCustomer.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClientForCustomer.kt index 557ad50a..e8ec282c 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClientForCustomer.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/FinTsClientForCustomer.kt @@ -38,26 +38,14 @@ open class FinTsClientForCustomer( client.addAccountAsync(bank, customer, callback) } - open fun addAccount(callback: (AddAccountResponse) -> Unit) { - client.addAccount(bank, customer, callback) - } - open fun getTransactionsAsync(parameter: GetTransactionsParameter, account: AccountData, callback: (GetTransactionsResponse) -> Unit) { client.getTransactionsAsync(parameter, bank, customer, account, callback) } - open fun getTransactions(parameter: GetTransactionsParameter, account: AccountData, callback: (GetTransactionsResponse) -> Unit) { - client.getTransactions(parameter, bank, customer, account, callback) - } - open fun doBankTransferAsync(bankTransferData: BankTransferData, account: AccountData, callback: (FinTsClientResponse) -> Unit) { client.doBankTransferAsync(bankTransferData, bank, customer, account, callback) } - open fun doBankTransfer(bankTransferData: BankTransferData, account: AccountData, callback: (FinTsClientResponse) -> Unit) { - client.doBankTransfer(bankTransferData, bank, customer, account, callback) - } - } \ No newline at end of file