flow-js-testing icon indicating copy to clipboard operation
flow-js-testing copied to clipboard

Include in docs how to check events

Open alilloig opened this issue 2 years ago • 3 comments

Closes #202

Description

Updates the sendTransaction of the docs to give a more detailed view on the result object that can be captured from the tx execution, giving some hints on how to check events from that

For contributor use:

  • [x] Targeted PR against master branch
  • [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • [x] Code follows the standards mentioned here
  • [x] Updated relevant documentation
  • [x] Re-reviewed Files changed in the Github PR explorer
  • [x] Added appropriate labels

alilloig avatar Jan 20 '23 16:01 alilloig

⚠️ No Changeset found

Latest commit: 4742546432680af246763d127a20733ccf9b8fa5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

changeset-bot[bot] avatar Jan 20 '23 16:01 changeset-bot[bot]

I would like the @onflow/fcl folks to take a look at the array returned by sendTransaction. For the first signature we suggest that it's an array containing result and errors [result, error] , while for the second signature we say it also includes an object call logs [result, error, logs] .

If I use the second signature and log the result I get

    [
      {
        blockId: '',
        status: 4,
        statusString: 'SEALED',
        statusCode: 0,
        errorMessage: '',
        events: [ [Object] ]
      },
      null
    ]

So I'd say the first one is true, but I'd love you folks to confirm that.

alilloig avatar Jan 20 '23 16:01 alilloig

As always for docs a check on use of english from any native speaker will be highly appreciated!!

alilloig avatar Jan 20 '23 16:01 alilloig