mirror of
https://github.com/corda/corda.git
synced 2025-02-20 09:26:41 +00:00
Minor: rename wallet -> cashStates in the Cash contract spending function.
This commit is contained in:
parent
f13b9b00e4
commit
2df8153cda
@ -165,7 +165,7 @@ class Cash : Contract {
|
||||
*/
|
||||
@Throws(InsufficientBalanceException::class)
|
||||
fun craftSpend(tx: PartialTransaction, amount: Amount, to: PublicKey,
|
||||
wallet: List<StateAndRef<Cash.State>>, onlyFromParties: Set<Party>? = null) {
|
||||
cashStates: List<StateAndRef<State>>, onlyFromParties: Set<Party>? = null) {
|
||||
// Discussion
|
||||
//
|
||||
// This code is analogous to the Wallet.send() set of methods in bitcoinj, and has the same general outline.
|
||||
@ -188,7 +188,7 @@ class Cash : Contract {
|
||||
|
||||
val currency = amount.currency
|
||||
val acceptableCoins = run {
|
||||
val ofCurrency = wallet.filter { it.state.amount.currency == currency }
|
||||
val ofCurrency = cashStates.filter { it.state.amount.currency == currency }
|
||||
if (onlyFromParties != null)
|
||||
ofCurrency.filter { it.state.deposit.party in onlyFromParties }
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user