diff --git a/src/main/java/contracts/JavaCommercialPaper.java b/contracts/src/main/java/contracts/JavaCommercialPaper.java similarity index 96% rename from src/main/java/contracts/JavaCommercialPaper.java rename to contracts/src/main/java/contracts/JavaCommercialPaper.java index a2b69e02e3..314031d75d 100644 --- a/src/main/java/contracts/JavaCommercialPaper.java +++ b/contracts/src/main/java/contracts/JavaCommercialPaper.java @@ -9,16 +9,20 @@ package contracts; import core.*; -import core.TransactionForVerification.*; -import core.crypto.*; -import org.jetbrains.annotations.*; +import core.TransactionForVerification.InOutGroup; +import core.crypto.NullPublicKey; +import core.crypto.SecureHash; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import java.security.PublicKey; +import java.time.Instant; +import java.util.List; + +import static core.ContractsDSLKt.requireSingleCommand; +import static kotlin.collections.CollectionsKt.single; -import java.security.*; -import java.time.*; -import java.util.*; -import static core.ContractsDSLKt.*; -import static kotlin.collections.CollectionsKt.*; /** @@ -226,7 +230,7 @@ public class JavaCommercialPaper implements Contract { return new TransactionBuilder().withItems(state, new Command( new Commands.Issue(), issuance.getParty().getOwningKey())); } - public void generateRedeem(TransactionBuilder tx, StateAndRef paper, List> wallet) throws InsufficientBalanceException { + public void generateRedeem(TransactionBuilder tx, StateAndRef paper, List> wallet) throws InsufficientBalanceException { new Cash().generateSpend(tx, paper.getState().getFaceValue(), paper.getState().getOwner(), wallet, null); tx.addInputState(paper.getRef()); tx.addCommand(new Command( new Commands.Redeem(), paper.getState().getOwner()));