Skip to content

Commit

Permalink
Remane Finalize
Browse files Browse the repository at this point in the history
  • Loading branch information
ashutoshmeher-r3 committed Aug 29, 2023
1 parent 1c8298a commit 0dd8b22
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@

//@InitiatingBy declares the protocol which will be used to link the initiator to the responder.
@InitiatedBy(protocol = "finalize-gold-protocol")
public class FinalizeMintResponderFlow implements ResponderFlow {
private final static Logger log = LoggerFactory.getLogger(FinalizeMintResponderFlow.class);
public class FinalizeGoldTokenResponderFlow implements ResponderFlow {
private final static Logger log = LoggerFactory.getLogger(FinalizeGoldTokenResponderFlow.class);

// Injects the UtxoLedgerService to enable the flow to make use of the Ledger API.
@CordaInject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
import java.util.List;

@InitiatingFlow(protocol = "finalize-gold-protocol")
public class FinalizeMintSubFlow implements SubFlow<String> {
public class FinalizeGoldTokenSubFlow implements SubFlow<String> {

private final static Logger log = LoggerFactory.getLogger(FinalizeMintSubFlow.class);
private final static Logger log = LoggerFactory.getLogger(FinalizeGoldTokenSubFlow.class);
private final UtxoSignedTransaction signedTransaction;
private final MemberX500Name otherMember;

public FinalizeMintSubFlow(UtxoSignedTransaction signedTransaction, MemberX500Name otherMember) {
public FinalizeGoldTokenSubFlow(UtxoSignedTransaction signedTransaction, MemberX500Name otherMember) {
this.signedTransaction = signedTransaction;
this.otherMember = otherMember;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import net.corda.v5.application.flows.*;
import net.corda.v5.application.marshalling.JsonMarshallingService;
import net.corda.v5.application.membership.MemberLookup;
import net.corda.v5.application.messaging.FlowMessaging;
import net.corda.v5.base.annotations.Suspendable;
import net.corda.v5.base.exceptions.CordaRuntimeException;
import net.corda.v5.base.types.MemberX500Name;
Expand Down Expand Up @@ -87,7 +86,7 @@ public String call(ClientRequestBody requestBody) {
UtxoSignedTransaction signedTransaction = txBuilder.toSignedTransaction();


return flowEngine.subFlow(new FinalizeMintSubFlow(signedTransaction, owner.getName()));
return flowEngine.subFlow(new FinalizeGoldTokenSubFlow(signedTransaction, owner.getName()));
}
// Catch any exceptions, log them and rethrow the exception.
catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public String call( ClientRequestBody requestBody) {

UtxoSignedTransaction signedTransaction = txBuilder.toSignedTransaction();

flowEngine.subFlow(new FinalizeMintSubFlow(signedTransaction, receiver.getName()));
flowEngine.subFlow(new FinalizeGoldTokenSubFlow(signedTransaction, receiver.getName()));

}
catch (Exception e) {
Expand Down

0 comments on commit 0dd8b22

Please sign in to comment.