Skip to content

Allow Node library users to have full control over the transaction lifecycle #93

Open

Description

@psiemens

Currently a user can call client.sendAsync, which submits a transaction to Flow and return its transaction ID. They can then poll for the results of that transaction by ID. However, they will need to parse any errors and events themselves, rather than relying on the built-in handlers inside Freshmint.

Some users will need to manage the complete lifecycle of a transaction in order to remain fault tolerant and respond to errors gracefully. We should find a way for the caller to own the transaction lifecycle but still make use of the event parsing functions provided by Freshmint.

Activity

  1. self-assigned this
    on Sep 19, 2022
  2. psiemens commented on Sep 19, 2022

    @psiemens
    ContributorAuthor

    Note: this probably also means improving the error handling logic here: https://github.com/packagelabs/freshmint/blob/alpha/src/lib/transactions.ts#L105

    Callers should be able to distinguish between network errors and execution errors, for example, and handle them accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions