mirror of
https://github.com/corda/corda.git
synced 2025-01-01 02:36:44 +00:00
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:
parent
998aa8e024
commit
cbd52b28d6
@ -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 }
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user