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

transactions - ensure err is defined when setting tx failed #5801

Merged
merged 1 commit into from
Nov 26, 2018

Conversation

frankiebee
Copy link
Contributor

so @brunobar79 instead of what we discussed i did this so that we dont mess with sentry logs because they need the error before the fail event which is fired during the status change

Copy link
Contributor

@brunobar79 brunobar79 left a comment

Choose a reason for hiding this comment

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

@frankiebee Makes sense. Just added a small comment

@@ -361,13 +361,15 @@ class TransactionStateManager extends EventEmitter {
@param err {erroObject} - error object
*/
setTxStatusFailed (txId, err) {
let error = !err ? Error('Internal metamask failure') : err
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't be new Error('Internal metamask failure') ?

Copy link
Contributor

@brunobar79 brunobar79 Nov 21, 2018

Choose a reason for hiding this comment

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

Also the linter is failing because it wants a const instead of let

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ooh woops

@metamaskbot
Copy link
Collaborator

Builds ready [c581f50]: mascara, chrome, firefox, edge, opera

Copy link
Contributor

@brunobar79 brunobar79 left a comment

Choose a reason for hiding this comment

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

LGTM!

@frankiebee frankiebee merged commit 97c1e6b into develop Nov 26, 2018
@frankiebee frankiebee deleted the fail-first-tx branch November 26, 2018 19:01
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