I have an event with two indexed arguments orderId and status. Filtering works fine when I filter the event on orderId which is uint.
I am not able to filter the events on the second argument (status) which is bytes32
event StatusChange( uint indexed orderId ,bytes32 indexed status );
I try to filter the StatusChange event
On executing the below code I get all the StatusChange events . I want to get only those events where the status is "New"
myContractInstance.StatusChange({status:"New"}, { fromBlock: 0, toBlock: 'latest' }).get( function (error, log) {
if (error)
console.log('Error in myEvent event handler: ' + error);
else
console.log('myEvent: ' + log);
});
Please help me know what am I doing wrong here.