Filtering out potential remittees without IBAN
This commit is contained in:
parent
044ff141a5
commit
0f081006ed
|
@ -140,7 +140,9 @@ class CoreDataBankingPersistence: IBankingPersistence, IRemitteeSearcher {
|
||||||
NSLog("Could not request Customers: \(error)")
|
NSLog("Could not request Customers: \(error)")
|
||||||
}
|
}
|
||||||
|
|
||||||
let remittees = transactions.map( { Remittee(name: $0.otherPartyName ?? "", iban: $0.otherPartyAccountId, bic: $0.otherPartyBankCode, bankName: nil) } )
|
let remittees = transactions
|
||||||
|
.filter { $0.otherPartyAccountId != nil } // if IBAN is not set we cannot make use of it
|
||||||
|
.map( { Remittee(name: $0.otherPartyName ?? "", iban: $0.otherPartyAccountId, bic: $0.otherPartyBankCode, bankName: nil) } )
|
||||||
|
|
||||||
let uniqueRemittees = Set<Remittee>(remittees)
|
let uniqueRemittees = Set<Remittee>(remittees)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue