mirror of
https://github.com/corda/corda.git
synced 2025-02-22 10:10:59 +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)
|
@Throws(InsufficientBalanceException::class)
|
||||||
fun craftSpend(tx: PartialTransaction, amount: Amount, to: PublicKey,
|
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
|
// Discussion
|
||||||
//
|
//
|
||||||
// This code is analogous to the Wallet.send() set of methods in bitcoinj, and has the same general outline.
|
// 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 currency = amount.currency
|
||||||
val acceptableCoins = run {
|
val acceptableCoins = run {
|
||||||
val ofCurrency = wallet.filter { it.state.amount.currency == currency }
|
val ofCurrency = cashStates.filter { it.state.amount.currency == currency }
|
||||||
if (onlyFromParties != null)
|
if (onlyFromParties != null)
|
||||||
ofCurrency.filter { it.state.deposit.party in onlyFromParties }
|
ofCurrency.filter { it.state.deposit.party in onlyFromParties }
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user