Created
April 8, 2018 18:48
-
-
Save azamsharp/66b2ff1ef206bb92d482989f08986061 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func transactionsBy(drivingLicenseNumber :String) -> [Transaction] { | |
| var transactions = [Transaction]() | |
| self.blocks.forEach { block in | |
| block.transactions.forEach { transaction in | |
| if transaction.driverLicenseNumber == drivingLicenseNumber.sha1Hash() { | |
| transactions.append(transaction) | |
| } | |
| } | |
| } | |
| return transactions | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment