Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

how to capture block events in real time and finalizedEvents for the same call? #1010

Closed
Tracked by #724
ryanleecode opened this issue May 16, 2023 · 1 comment · Fixed by #1097
Closed
Tracked by #724
Assignees

Comments

@ryanleecode
Copy link
Contributor

Given

await signedExtrinsicRune
      .sent()
      .transactionStatuses((txStatus) => {
        console.log("txStatus")
        return false
      })
      .run()

I can capture block events in real time... but if I want to capture the finalizedEvents as well I don't think its possible.

const sentRune = await signedExtrinsicRune
      .sent()

sentRune
      .transactionStatuses((txStatus) => {
        console.log("txStatus")
        return false
      })
      .run()

console.log(sentRune.finalizedEvents().run()) // doesn't workk
@harrysolovay
Copy link
Contributor

harrysolovay commented May 16, 2023

These would have different run contexts. I could see us supporting the following though:

const [finalizedEvents] = await Rune.tuple([
  sent.finalizedEvents(),
  sent.transactionStatuses(cb),
]).run()

I believe this will be addressed as part of #721

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants