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

metamask rejection fix #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

metamask rejection fix #15

wants to merge 1 commit into from

Conversation

chrisfenos
Copy link
Contributor

  • submitDeposit action delayed until after the error is thrown such that the metamask rejection error will not progress the components further.

@chrisfenos chrisfenos requested a review from ansermino February 14, 2019 11:50
this.props.updateDepositHash(txHash)
try {
const txHash = await executeDeposit(this.props.address, this.state.amount, this.props.networkID)
this.props.submitDeposit()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

submitDeposit needs to happen before executeDeposit because it causes the UI to enter the loading state, otherwise it will only change once the deposit is submitted

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ansermino the way it was set up after the refactor froze the application on errors with respect to the executeDeposit call. If you call the submitDeposit action first it will trigger the loading screen. If you know of a better way to handle this issue, otherwise we'd have to rewrite the logic throughout the app.

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

Successfully merging this pull request may close these issues.

3 participants