Fixed that if fetchBalanceAndTransactions was set to false accounts haven't been returned
This commit is contained in:
parent
ab35c7f49f
commit
9c9ebb9d57
|
@ -111,7 +111,8 @@ open class FinTsClient(
|
|||
addAccountGetAccountBalancesAndTransactions(bank, getAccountsResponse, callback)
|
||||
}
|
||||
else {
|
||||
addAccountDone(bank, getAccountsResponse, mapOf(), callback)
|
||||
val retrievedAccountData = bank.accounts.associateBy( { it }, { RetrievedAccountData.balanceAndTransactionsNotRequestedByUser(it) } )
|
||||
addAccountDone(bank, getAccountsResponse, retrievedAccountData, callback)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,10 @@ open class RetrievedAccountData(
|
|||
|
||||
companion object {
|
||||
|
||||
fun balanceAndTransactionsNotRequestedByUser(account: AccountData): RetrievedAccountData {
|
||||
return RetrievedAccountData(account, true, null, listOf(), listOf(), null, null)
|
||||
}
|
||||
|
||||
fun unsuccessful(account: AccountData): RetrievedAccountData {
|
||||
return RetrievedAccountData(account, false, null, listOf(), listOf(), null, null)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue