Skip to content

Instantly share code, notes, and snippets.

@azamsharp
Created April 8, 2018 18:48
Show Gist options
  • Select an option

  • Save azamsharp/66b2ff1ef206bb92d482989f08986061 to your computer and use it in GitHub Desktop.

Select an option

Save azamsharp/66b2ff1ef206bb92d482989f08986061 to your computer and use it in GitHub Desktop.
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