@stellar-expert/tx-meta-effects-parser 6.1.0 → 6.1.1
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 +2 -2
- package/src/effects-analyzer.js +4 -1
- package/src/index.js +5 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stellar-expert/tx-meta-effects-parser",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.1",
|
|
4
4
|
"description": "Low-level effects parser for Stellar transaction results and meta XDR",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"author": "team@stellar.expert",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"peerDependencies": {
|
|
12
|
-
"@stellar/stellar-base": "^12.1.
|
|
12
|
+
"@stellar/stellar-base": "^12.1.0"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"@babel/core": "^7.22.9",
|
package/src/effects-analyzer.js
CHANGED
|
@@ -206,7 +206,10 @@ class EffectsAnalyzer {
|
|
|
206
206
|
}
|
|
207
207
|
|
|
208
208
|
addFeeMetric(metaValue) {
|
|
209
|
-
const
|
|
209
|
+
const {sorobanMeta} = metaValue._attributes
|
|
210
|
+
if (!sorobanMeta)
|
|
211
|
+
return
|
|
212
|
+
const sorobanExt = sorobanMeta._attributes.ext._value
|
|
210
213
|
if (sorobanExt) {
|
|
211
214
|
const attrs = sorobanExt._attributes
|
|
212
215
|
const fee = {
|
package/src/index.js
CHANGED
|
@@ -156,10 +156,12 @@ function parseTxOperationsMeta({
|
|
|
156
156
|
//only for Soroban contract invocation
|
|
157
157
|
if (isSorobanInvocation) {
|
|
158
158
|
const sorobanMeta = metaValue._attributes.sorobanMeta
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
if (sorobanMeta) {
|
|
160
|
+
params.events = sorobanMeta.events()
|
|
161
|
+
params.diagnosticEvents = sorobanMeta.diagnosticEvents()
|
|
162
|
+
params.processSystemEvents = processSystemEvents
|
|
163
|
+
}
|
|
161
164
|
params.mapSac = mapSac
|
|
162
|
-
params.processSystemEvents = processSystemEvents
|
|
163
165
|
}
|
|
164
166
|
const analyzer = new EffectsAnalyzer(params)
|
|
165
167
|
operation.effects = analyzer.analyze()
|