-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Fixed Vivek's bug #5860
Merged
Fixed Vivek's bug #5860
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes #5850 What was happening: It seems that his MetaMask had crashed while some new transactions had been loading defaults. He probably had a network connectivity issue to Infura (which we are working with Infura to address). As a result of this network cutout, his three unapproved transactions were not marked failed, and were not marked as `loadingDefaults = false`, as their gas prices had not yet been estimated. Normally this behavior is supposed to clean itself up when the transaction controller starts up, via the `TransactionController._onBootCleanUp()` function, but in this case, during unlock, that function was unable to do its job because when it requested the transaction list, the current network was in the `loading` state, making it proceed as if there were no pending transactions. To fix this, I am doing two things: - Setting transactions to loadingDefaults = false in more catch blocks. - Calling `onBootCleanUp()` when the network store's status changes, so that it will re-trigger when loading completes.
Closing until I fix this bug |
Was refreshing the tx list on every tx state change instead of just network changes, creating an infinite loop.
That should do it. |
frankiebee
previously requested changes
Nov 29, 2018
frankiebee
previously approved these changes
Nov 29, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
frankiebee
approved these changes
Nov 29, 2018
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #5850
What was happening:
It seems that his MetaMask had crashed while some new transactions had
been loading defaults. He probably had a network connectivity issue to
Infura (which we are working with Infura to address).
As a result of this network cutout, his three unapproved transactions
were not marked failed, and were not marked as
loadingDefaults = false
, as their gas prices had not yet been estimated.Normally this behavior is supposed to clean itself up when the
transaction controller starts up, via the
TransactionController._onBootCleanUp()
function, but in this case,during unlock, that function was unable to do its job because when it
requested the transaction list, the current network was in the
loading
state, making it proceed as if there were no pending transactions.
Since we had
unapproved
transactions stuck in theloadingDefaults
state, this triggered the loading spinner permanently on the confirmation screen.To fix this, I am doing two things:
onBootCleanUp()
when the network store's status changes, sothat it will re-trigger when network loading completes.