Fixed return getBankInfoResponse including its error
This commit is contained in:
parent
bd2c96bbcb
commit
fed10e21c0
|
@ -629,13 +629,12 @@ open class FinTsJobExecutor(
|
||||||
protected open fun ensureBasicBankDataRetrieved(bank: BankData, callback: (BankResponse) -> Unit) {
|
protected open fun ensureBasicBankDataRetrieved(bank: BankData, callback: (BankResponse) -> Unit) {
|
||||||
if (bank.tanMethodSupportedByBank.isEmpty() || bank.supportedJobs.isEmpty()) {
|
if (bank.tanMethodSupportedByBank.isEmpty() || bank.supportedJobs.isEmpty()) {
|
||||||
retrieveBasicDataLikeUsersTanMethods(bank) { getBankInfoResponse ->
|
retrieveBasicDataLikeUsersTanMethods(bank) { getBankInfoResponse ->
|
||||||
if (getBankInfoResponse.successful == false || bank.tanMethodSupportedByBank.isEmpty()
|
if (getBankInfoResponse.successful == false) {
|
||||||
|| bank.supportedJobs.isEmpty()) {
|
callback(getBankInfoResponse)
|
||||||
|
} else if (bank.tanMethodSupportedByBank.isEmpty() || bank.supportedJobs.isEmpty()) {
|
||||||
callback(BankResponse(false, errorMessage =
|
callback(BankResponse(false, errorMessage =
|
||||||
"Could not retrieve basic bank data like supported tan methods or supported jobs")) // TODO: translate // TODO: add as messageToShowToUser
|
"Could not retrieve basic bank data like supported tan methods or supported jobs")) // TODO: translate // TODO: add as messageToShowToUser
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
callback(BankResponse(true))
|
callback(BankResponse(true))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue