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

Restore button state after MetaMask transaction was cancelled #26

Open
marsrobertson opened this issue Apr 19, 2019 · 1 comment
Open
Labels
bug Something isn't working

Comments

@marsrobertson
Copy link

I cancel transaction on MetaMask.

Button remains spinning.

Of course I can reload the page.

Nice to have to restore initial button state.

@satello satello added the bug Something isn't working label Apr 19, 2019
@cylim
Copy link

cylim commented Aug 2, 2019

I would say this is not very important since most actions doesn't depends on other actions, a refresh on the page will do.

In case if wanted to fix it, we can treat error code -32603 differently in saga.js:37

{
code: -32603, 
message: "Error: MetaMask Tx Signature: User denied transaction signature."
}

Or add the actions.setSubmitting(false) to all the Formik form.

<Formik
        onSubmit={(values, actions) => {
          CallMyApi(user.id, values)
            .error(() => {
              actions.setSubmitting(false);
            })
          );
        }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants