diff --git a/package.json b/package.json index 46bddc5..9978121 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kryptokrauts/event-processor-node-lib", - "version": "1.0.2", + "version": "1.0.3", "description": "Wrapper for ease listening on antelope blockchain based on @blockmatic/antelope-ship-reader", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/eosio/ship-reader-wrapper.ts b/src/eosio/ship-reader-wrapper.ts index 3076af1..5d8c1f7 100644 --- a/src/eosio/ship-reader-wrapper.ts +++ b/src/eosio/ship-reader-wrapper.ts @@ -182,6 +182,7 @@ export class ShipReaderWrapper { type: action.name, transaction_id: action.transaction_id, data: result.msg, + global_sequence: action.global_sequence, }); await this.kafka_wrapper.sendEvent(msg, action.name); } else { diff --git a/src/kafka/kafka-wrapper.ts b/src/kafka/kafka-wrapper.ts index bb3ce6c..7fc0519 100644 --- a/src/kafka/kafka-wrapper.ts +++ b/src/kafka/kafka-wrapper.ts @@ -40,7 +40,7 @@ class KafkaWrapper { logger.debug(`Fetching offset for contract topic ${KAFKA_TOPIC_CONFIG.contract_topic}`); // if offset for contract topic exists - if (topicOffsets && topicOffsets.length === 1 && Number(topicOffsets[0]) > 0) { + if (topicOffsets && topicOffsets.length === 1 && Number(topicOffsets[0].offset) > 0) { // get the current offset and decrease by 1 const seekEntry: SeekEntry = topicOffsets[0]; const offset = Number(seekEntry.offset) - 1;