Transaction event is not invoked using node sdk #fabric-sdk-node


amit kumar savita
 

Hi fabric team,

I am trying to implement transaction event in following way but somehow event is not invoke.Pls check below snippet code.

========================================================================
    const transaction = contract.createTransaction("createCar");
    let listener;
try {
       listener = async (event) => {
        console.log("event.eventName=========",event.eventName);
                };
    }
 catch (eventError) {
                        console.log(eventError);
        }
 
     const peers = network.getChannel().getEndorsers("Org1MSP");
     await contract.submitTransaction('createCar' ,'CAR1112', 'Honda', 'Accord', 'Black', 'Tom' );
     await network.addCommitListener(listener,peers,transaction.getTransactionId());
 
 
========================================================================

Join fabric@lists.hyperledger.org to automatically receive all group messages.