Update party match in vault service

Replaces the legacy name-only comparison in the vault service with a party comparison. `Party` now
has an equals method that only uses the owning key, and therefore this functions as expected.
This commit is contained in:
Ross Nicoll 2017-02-02 15:51:24 +00:00 committed by Chris Rankin
parent 998aa8e024
commit cbd52b28d6

View File

@ -203,8 +203,7 @@ interface VaultService {
inline fun <reified T : LinearState> VaultService.linearHeadsOfType() = linearHeadsOfType_(T::class.java)
inline fun <reified T : DealState> VaultService.dealsWith(party: Party) = linearHeadsOfType<T>().values.filter {
// TODO: Replace name comparison with full party comparison (keys are currenty not equal)
it.state.data.parties.any { it.name == party.name }
it.state.data.parties.any { it == party }
}
/**