-
Notifications
You must be signed in to change notification settings - Fork 60
Description
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