@stellar-expert/tx-meta-effects-parser 9.2.0 → 9.3.0

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stellar-expert/tx-meta-effects-parser",
3
- "version": "9.2.0",
3
+ "version": "9.3.0",
4
4
  "description": "Low-level effects parser for Stellar transaction results and meta XDR",
5
5
  "main": "src/index.js",
6
6
  "author": "team@stellar.expert",
@@ -788,6 +788,8 @@ class EffectsAnalyzer {
788
788
  case 'wasm':
789
789
  effect.wasmHash = after.wasmHash
790
790
  break
791
+ case 'fromAddress':
792
+ break
791
793
  default:
792
794
  throw new TxMetaEffectParserError('Unexpected contract type: ' + kind)
793
795
  }
@@ -278,12 +278,14 @@ function parseContractData(value) {
278
278
  const type = instance.executable._switch.name
279
279
  switch (type) {
280
280
  case 'contractExecutableStellarAsset':
281
- entry.kind = 'fromAsset'
282
281
  if (instance.storage?.length) { //if not -- the asset has been created "fromAddress" - no metadata in this case
282
+ entry.kind = 'fromAsset'
283
283
  const metaArgs = instance.storage[0]._attributes
284
284
  if (metaArgs.key._value.toString() !== 'METADATA')
285
285
  throw new TxMetaEffectParserError('Unexpected asset initialization metadata')
286
286
  entry.asset = xdrParseAsset(metaArgs.val._value[1]._attributes.val._value.toString())
287
+ } else {
288
+ entry.kind = 'fromAddress'
287
289
  }
288
290
  break
289
291
  case 'contractExecutableWasm':