1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 12:29:06 +01:00
metamask-extension/app
Mark Stacey 5b5b67a985
Fix default gas race condition (#8490)
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.
2020-05-01 12:25:45 -03:00
..
_locales Alert user upon switching to unconnected account (#8312) 2020-04-29 14:10:51 -03:00
fonts Use @fortawesome/fontawesome-free npm package (#8256) 2020-03-30 20:05:51 -03:00
images Connect flow via popup (#8269) 2020-04-07 16:08:15 -02:30
manifest Build system refactor (#8140) 2020-03-09 08:55:02 +08:00
scripts Fix default gas race condition (#8490) 2020-05-01 12:25:45 -03:00
vendor/trezor Close window after opening fullscreen (#6966) 2019-08-08 11:50:32 -03:00
home.html Add optional portal to Popover component (#8253) 2020-03-30 18:25:17 -02:30
loading.html refactor & change html pages 2019-05-04 18:57:19 +02:00
notification.html Add optional portal to Popover component (#8253) 2020-03-30 18:25:17 -02:30
phishing.html Use main style bundle for phishing page (#8255) 2020-03-30 19:44:46 -03:00
popup.html Add optional portal to Popover component (#8253) 2020-03-30 18:25:17 -02:30
trezor-usb-permissions.html trezor v5 working on firefox 2018-08-05 02:43:02 -04:00
unsupport.html Rename files 2018-05-29 12:44:37 +08:00