Я использую приведенный ниже код для отправки транзакции в матрице, но не получаю Id фиксации транзакции в узле js SDK
let eventHub = await hlcConnection.channel.newChannelEventHub(hlcConnection.peer);
// eventHub = await hlcConnection.channel.getChannelEventHubsForOrg("updevop1");
//eventHub = await hlcConnection.channel.getChannelEventHubsForOrg();
let txPromise = new Promise((resolve, reject) => {
let handle = setTimeout(() => {
eventHub.unregisterTxEvent(transactionIdString);
eventHub.disconnect();
resolve({event_status: "TIMEOUT"});
}, 30000);
eventHub.registerTxEvent(transactionIdString, (tx: any, code: any, block: any) => {
clearTimeout(handle);
const returnsStatus = {event_status: code, tx_id: tx};
if (code !== "VALID") {
console.error("The transaction was invalid, code = " + code);
resolve(returnsStatus);
} else {
console.log("The transaction has been committed on peer " + eventHub.getPeerAddr());
resolve(returnsStatus);
}
}, (err: any) => {
//this is the callback if something goes wrong with the event registration or processing
reject(new Error("There was a problem with the eventhub ::" + err));
},
{startBlock: null} //disconnect when complete
);
eventHub.connect();
});
promises.push(txPromise);
Я получаю txid 4826e50b51d505c31c6529a1699d51a8c78aaa6b0b360f92f44f8be7855b08cfd ef_d_d_file_d_d_ru_file_d_date_tm_d_d_ru_tf_d_d_ru_tf_d_d_tj_id_tf_tml46c6-9094-93deb464184c "
Я не могу получить этот фиксирующий идентификатор во время концентратора событий. Помогите мне решить эту проблему