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

Ensure Etherscan result is valid before reading it #7426

Merged
merged 1 commit into from
Nov 15, 2019

Conversation

whymarrh
Copy link
Contributor

This PR updates the conditions under which we attempt to read the results of an incoming tx list from Etherscan. We were previously reading the result when the status was non-zero but that saw type errors where the result property was null or a string.

We now handle the following responses:

{"status":"0","message":"No transactions found","result":[]}
{"status":"1","message":"OK","result":null}
{"status":"0","message":"NOTOK","result":"Error! Missing Or invalid Action name"}

@whymarrh whymarrh requested a review from danjm November 14, 2019 17:32
Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

Looks good!

@whymarrh whymarrh merged commit 00e43d0 into MetaMask:develop Nov 15, 2019
@whymarrh whymarrh deleted the fix-incoming-tx-process branch November 15, 2019 17:17
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.

2 participants