@stellar-expert/tx-meta-effects-parser 7.0.0-rc.3 → 7.0.0-rc.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +4 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stellar-expert/tx-meta-effects-parser",
3
- "version": "7.0.0-rc.3",
3
+ "version": "7.0.0-rc.5",
4
4
  "description": "Low-level effects parser for Stellar transaction results and meta XDR",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/index.js CHANGED
@@ -9,7 +9,6 @@ const {analyzeSignerChanges} = require('./aggregation/signer-changes-analyzer')
9
9
  const contractPreimageEncoder = require('./parser/contract-preimage-encoder')
10
10
  const xdrParserUtils = require('./parser/tx-xdr-parser-utils')
11
11
  const effectTypes = require('./effect-types')
12
- const events = require('node:events')
13
12
 
14
13
  /**
15
14
  * Retrieve effects from transaction execution result metadata
@@ -170,7 +169,10 @@ function parseTxOperationsMeta({
170
169
  }
171
170
  if (isV4Meta) {
172
171
  params.diagnosticEvents = metaValue.diagnosticEvents()
173
- params.events = metaValue.operations()[0].events()
172
+ const invocationOp = metaValue.operations()[0]
173
+ if (invocationOp) {
174
+ params.events = invocationOp.events()
175
+ }
174
176
  }
175
177
  params.mapSac = mapSac
176
178
  }