mirror of
https://github.com/corda/corda.git
synced 2024-12-24 15:16:45 +00:00
Fix docs on branching verify with commands
This commit is contained in:
parent
68145e16de
commit
b51c398ebe
@ -204,7 +204,7 @@ the single command of type ``XContract.Commands`` from the transaction, and bran
|
|||||||
override fun verify(tx: LedgerTransaction) {
|
override fun verify(tx: LedgerTransaction) {
|
||||||
val command = tx.findCommand<Commands> { true }
|
val command = tx.findCommand<Commands> { true }
|
||||||
|
|
||||||
when (command) {
|
when (command.value) {
|
||||||
is Commands.Issue -> {
|
is Commands.Issue -> {
|
||||||
// Issuance verification logic.
|
// Issuance verification logic.
|
||||||
}
|
}
|
||||||
@ -225,7 +225,7 @@ the single command of type ``XContract.Commands`` from the transaction, and bran
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void verify(LedgerTransaction tx) {
|
public void verify(LedgerTransaction tx) {
|
||||||
final Command<Commands> command = tx.findCommand(Commands.class, cmd -> true);
|
final Commands command = tx.findCommand(Commands.class, cmd -> true).getValue();
|
||||||
|
|
||||||
if (command instanceof Commands.Issue) {
|
if (command instanceof Commands.Issue) {
|
||||||
// Issuance verification logic.
|
// Issuance verification logic.
|
||||||
|
Loading…
Reference in New Issue
Block a user