@stellar-expert/tx-meta-effects-parser 7.0.0-rc.2 → 7.0.0-rc.4
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.
package/package.json
CHANGED
|
@@ -304,7 +304,7 @@ function processEventBodyValue(value) {
|
|
|
304
304
|
/*if (innerValue instanceof Array) //handle simple JS arrays
|
|
305
305
|
return innerValue.map(xdrParseScVal)*/
|
|
306
306
|
if (!innerValue) //scVoid
|
|
307
|
-
return
|
|
307
|
+
return null
|
|
308
308
|
return xdrParseScVal(value) //other scValue
|
|
309
309
|
}
|
|
310
310
|
|
package/src/index.js
CHANGED
|
@@ -141,7 +141,6 @@ function parseTxOperationsMeta({
|
|
|
141
141
|
const opMeta = metaValue.operations()
|
|
142
142
|
const isV4Meta = meta.arm() === 'v4'
|
|
143
143
|
let txEvents = isV4Meta ? metaValue.events() : undefined
|
|
144
|
-
let diagnosticEvents = isV4Meta ? metaValue.diagnosticEvents() : undefined
|
|
145
144
|
|
|
146
145
|
//analyze operation effects for each operation
|
|
147
146
|
for (let i = 0; i < parsedTx.operations.length; i++) {
|
|
@@ -153,14 +152,12 @@ function parseTxOperationsMeta({
|
|
|
153
152
|
meta: opMeta[i]?.changes() || [],
|
|
154
153
|
result: opResults[i],
|
|
155
154
|
processFailedOpEffects,
|
|
156
|
-
processMetrics
|
|
157
|
-
events: txEvents,
|
|
158
|
-
diagnosticEvents
|
|
155
|
+
processMetrics
|
|
159
156
|
}
|
|
160
157
|
const isSorobanInvocation = operation.type === 'invokeHostFunction'
|
|
161
158
|
//only for Soroban contract invocation
|
|
162
159
|
if (isSorobanInvocation) {
|
|
163
|
-
const sorobanMeta = metaValue._attributes
|
|
160
|
+
const {sorobanMeta} = metaValue._attributes
|
|
164
161
|
if (sorobanMeta) {
|
|
165
162
|
if (sorobanMeta.events) {
|
|
166
163
|
params.events = sorobanMeta.events()
|
|
@@ -170,6 +167,10 @@ function parseTxOperationsMeta({
|
|
|
170
167
|
}
|
|
171
168
|
params.processSystemEvents = processSystemEvents
|
|
172
169
|
}
|
|
170
|
+
if (isV4Meta) {
|
|
171
|
+
params.diagnosticEvents = metaValue.diagnosticEvents()
|
|
172
|
+
params.events = metaValue.operations()[0].events()
|
|
173
|
+
}
|
|
173
174
|
params.mapSac = mapSac
|
|
174
175
|
}
|
|
175
176
|
const analyzer = new EffectsAnalyzer(params)
|