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

Open popup before estimateGas finishes #2962

Merged
merged 6 commits into from
Jan 16, 2018
Merged

Open popup before estimateGas finishes #2962

merged 6 commits into from
Jan 16, 2018

Conversation

frankiebee
Copy link
Contributor

&& added a loading screen over conf-tx while waiting for estimateGas:
screen shot 2018-01-11 at 4 11 19 pm

@kumavis kumavis requested review from kumavis and removed request for kumavis January 15, 2018 20:16
@danfinlay danfinlay self-requested a review January 15, 2018 23:13
Copy link
Contributor

@danfinlay danfinlay 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, confirmed it works, please add a changelog entry!

@danfinlay danfinlay merged commit 1a8beb1 into master Jan 16, 2018
@danfinlay danfinlay deleted the open-popup branch January 16, 2018 00:18
Gudahtt added a commit that referenced this pull request May 1, 2020
A race condition exists where after adding an unapproved transaction,
it could be mutated and then replaced when the default gas parameters
are set. This happens because the transaction is added to state and
broadcast before the default gas parameters are set, because
calculating the default gas parameters to use takes some time.
Once they've been calculated, the false assumption was made that the
transaction hadn't changed.

The method responsible for setting the default gas now retrieves an
up-to-date copy of `txMeta`, and conditionally sets the defaults only
if they haven't yet been set.

This race condition was introduced in #2962, though that PR also added
a loading screen that avoided this issue by preventing the user from
interacting with the transaction until after the gas had been
estimated. Unfortunately this loading screen was not carried forward to
the new UI.
Gudahtt added a commit that referenced this pull request May 1, 2020
A race condition exists where after adding an unapproved transaction,
it could be mutated and then replaced when the default gas parameters
are set. This happens because the transaction is added to state and
broadcast before the default gas parameters are set, because
calculating the default gas parameters to use takes some time.
Once they've been calculated, the false assumption was made that the
transaction hadn't changed.

The method responsible for setting the default gas now retrieves an
up-to-date copy of `txMeta`, and conditionally sets the defaults only
if they haven't yet been set.

This race condition was introduced in #2962, though that PR also added
a loading screen that avoided this issue by preventing the user from
interacting with the transaction until after the gas had been
estimated. Unfortunately this loading screen was not carried forward to
the new UI.
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