@stellar-expert/tx-meta-effects-parser 7.0.0-rc.14 → 7.0.0-rc.15
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
package/src/index.js
CHANGED
|
@@ -140,7 +140,6 @@ function parseTxOperationsMeta({
|
|
|
140
140
|
const metaValue = meta.value()
|
|
141
141
|
const opMeta = metaValue.operations()
|
|
142
142
|
const isV4Meta = meta.arm() === 'v4'
|
|
143
|
-
let txEvents = isV4Meta ? metaValue.events() : undefined
|
|
144
143
|
|
|
145
144
|
//analyze operation effects for each operation
|
|
146
145
|
for (let i = 0; i < parsedTx.operations.length; i++) {
|
|
@@ -13,19 +13,22 @@ const {generateContractStateEntryHash, generateContractCodeEntryHash} = require(
|
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* @param {LedgerEntryChange[]} ledgerEntryChanges
|
|
16
|
+
* @param {Set<string>} [filter]
|
|
16
17
|
* @return {ParsedLedgerEntryMeta[]}
|
|
17
18
|
*/
|
|
18
|
-
function parseLedgerEntryChanges(ledgerEntryChanges) {
|
|
19
|
+
function parseLedgerEntryChanges(ledgerEntryChanges, filter = undefined) {
|
|
19
20
|
const changes = []
|
|
20
21
|
let state
|
|
21
22
|
let containsTtl = false
|
|
22
23
|
for (let i = 0; i < ledgerEntryChanges.length; i++) {
|
|
23
24
|
const entry = ledgerEntryChanges[i]
|
|
25
|
+
const type = entry._value._arm
|
|
26
|
+
if (filter && !filter.has(type)) //skip filtered ledger entry types
|
|
27
|
+
continue
|
|
24
28
|
const action = entry._arm
|
|
25
29
|
const stateData = parseEntry(entry, action)
|
|
26
30
|
if (stateData === undefined)
|
|
27
31
|
continue
|
|
28
|
-
const type = entry._value._arm
|
|
29
32
|
const change = {action, type}
|
|
30
33
|
switch (action) {
|
|
31
34
|
case 'state':
|