symbol-sdk-typescript-javascript icon indicating copy to clipboard operation
symbol-sdk-typescript-javascript copied to clipboard

InnerTransactions are not contained in a search result.

Open 44uk opened this issue 3 years ago • 2 comments

  1. Expected behavior and actual behavior. InnerTransactions are not contained in a search result, but getTransaction contains them.

  2. Steps to reproduce the problem. reproduce code: https://runkit.com/nizveyl/innertransactions-are-not-contained-in-a-result

  3. Specifications like the version of the project, operating system, or hardware. symbol-sdk v1.0.0

44uk avatar May 21 '21 00:05 44uk

yeah, this is intended for rest. I don't think it is a bug on the sdk. At the moment the full aggregate transaction needs 2 queries from the search endpoint.

  1. get the aggregate transaction wrapper.
  2. use the aggregateHash to query the transactions/{hash} to get the full payload.

Alternatively, you can use the embedded=true for in the searchCriteria to get the inner transaction only (no wrapper). However, there are limitations to using this flag in combination with other query params. I think the recipientAddress / signerPublicKey works nicely with embedded, but the tx type (aggComplete) will not work together with embedded.

I agree this limitation is not very convenient and we are planning to improve it (the whole catapult-rest) right now

rg911 avatar May 21 '21 08:05 rg911

Ok, thanks. I'm looking forward to improving it!

44uk avatar May 21 '21 08:05 44uk