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

Notify user when transaction fails ( today transactions just fail silently ) #792

Open
petersalomonsen opened this issue May 29, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@petersalomonsen
Copy link
Collaborator

petersalomonsen commented May 29, 2024

Is your feature request related to a problem? Please describe.
When using the "Don't ask again" for not having to confirm every transaction with the wallet, form submissions, likes and any other action that generates a transaction on the blockchain will be sent with only a blue toast notifying while the transaction is processing. This is possible because function access keys has the property to call functions on a specific smart contract a certain number of times until the "allowance" is fully spent. The allowance is a limited amount, typically 0.25 NEAR, to be spent on GAS fees for executing transactions. When the allowance of a function access key is all spent, transactions can no longer be executed with that key, and a new needs to be created. A new function access key is created when the user signs in.

Currently there is no warning when the allowance is spent, and when using "Don't ask again" there is no feedback about this.

If the transaction fails for other reasons, there is also no feedback to the user. If the account does not have enough funds to execute transaction, or if the contract fails, there is no feedback about this when "Don't ask again" is enabled. The blue toast indicating that the transaction is processing just stays there.

Describe the solution you'd like
When allowance is spent, there should be a notification to the user, and the access key should be removed so that it has to be re-generated. In practice this will just trigger the transaction confirmation, offering the user to re-enable "Don't ask again".

If the transaction fails because of lack of funds or the contract fails, there should also be a notification to the user with feedback of why the failure occured.

Additional context
It has to be investigated if this can be solved in DevHUB or if it needs to be solved in the NearSocialVM. In any case, if callbacks for Near.call are solved in the VM, it would be possible for DevHUB to handle any failures to execute a transaction.

@petersalomonsen petersalomonsen added the enhancement New feature or request label May 29, 2024
@petersalomonsen petersalomonsen changed the title Notify user when gas allowance is spent ( today transactions just fail silently ) Notify user when transaction fails ( today transactions just fail silently ) May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🆕 Triage
Development

No branches or pull requests

1 participant