@stellar-expert/tx-meta-effects-parser 7.0.0-rc.16 → 7.0.0-rc.18
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
|
@@ -22,7 +22,7 @@ function parseLedgerEntryChanges(ledgerEntryChanges, filter = undefined) {
|
|
|
22
22
|
let containsTtl = false
|
|
23
23
|
for (let i = 0; i < ledgerEntryChanges.length; i++) {
|
|
24
24
|
const entry = ledgerEntryChanges[i]
|
|
25
|
-
const type = entry._value._arm
|
|
25
|
+
const type = entry._value._arm || entry._value._attributes.data._arm
|
|
26
26
|
if (filter && !filter.has(type)) //skip filtered ledger entry types
|
|
27
27
|
continue
|
|
28
28
|
const action = entry._arm
|
|
@@ -43,7 +43,7 @@ function parseLedgerEntryChanges(ledgerEntryChanges, filter = undefined) {
|
|
|
43
43
|
break
|
|
44
44
|
case 'updated':
|
|
45
45
|
if (type === 'contractCode')
|
|
46
|
-
|
|
46
|
+
console.error(new UnexpectedTxMetaChangeError({type, action})) //happens only in protocol 20
|
|
47
47
|
if (!state && stateData.keyHash) { //likely, restored state
|
|
48
48
|
const restored = changes.find(ch => ch.action === 'restored' && ch.type === stateData.entry && ch.after.keyHash === stateData.keyHash)
|
|
49
49
|
state = restored?.after
|
|
@@ -242,7 +242,7 @@ function parseOfferEntry(value) {
|
|
|
242
242
|
asset: [xdrParseAsset(offerEntryXdr.selling()), xdrParseAsset(offerEntryXdr.buying())],
|
|
243
243
|
amount: offerEntryXdr.amount().toString(),
|
|
244
244
|
price: xdrParsePrice(rprice),
|
|
245
|
-
rprice,
|
|
245
|
+
rprice: rprice._attributes,
|
|
246
246
|
flags: offerEntryXdr.flags()
|
|
247
247
|
}
|
|
248
248
|
return data
|