Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Callback for Near.call #105

Open
petersalomonsen opened this issue Aug 26, 2023 · 0 comments
Open

Callback for Near.call #105

petersalomonsen opened this issue Aug 26, 2023 · 0 comments

Comments

@petersalomonsen
Copy link
Contributor

petersalomonsen commented Aug 26, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant