Skip to content

Callback for Near.call #105

@petersalomonsen

Description

@petersalomonsen

Social.set supports an onCommit callback handler. In order to be able to react to successful/failed transactions that don't need wallet confirmation, such a callback is also needed for Near.call.

For DevHub we are able to solve the issue of avoid having to confirm with the wallet for every post/like by the ongoing work here in the wallet-selector, but without a callback for Near.call, we won't be able to close the editor, or display the like when the transaction is finished.

This requirement seems to be solved in the Pull Request here: #83

Another requirement is that we also need a callback if the user choose to close the confirmation dialog, and does not proceed with the transaction. With the "don't ask again" feature is enabled, it's desirable to create user experiences with a loading indicator on buttons that triggers a transaction. For "Don't ask again", we can simply trigger page updates based on cache invalidation that happens when the transaction completes, but in case of closing the transaction confirmation dialog, a callback is needed, as there is no cache invalidation. This particular issue is also described here: NEAR-DevHub/neardevhub-bos#687

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions