1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-23 03:36:18 +02:00
metamask-extension/app/scripts
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
..
account-import-strategies Clean up "JSON File" import strategy test output (#7855) 2020-01-17 19:59:47 -03:30
controllers Fix default gas race condition (#8490) 2020-05-01 12:25:45 -03:00
lib fixes firefox popup location (#8467) 2020-04-29 17:04:03 -05:00
migrations Delete Dai/Sai migration notification (#8418) 2020-04-27 16:23:43 -02:30
platforms fixes firefox popup location (#8467) 2020-04-29 17:04:03 -05:00
background.js Remove unnecessary tx meta properties (#8489) 2020-05-01 08:44:05 -03:00
chromereload.js Fix console.error references 2016-08-29 17:32:39 -07:00
contentscript.js Merge pull request #8056 from whymarrh/arrow-parens 2020-02-17 15:26:43 -07:00
first-time-state.js Migrate codebase to use ESM (#7730) 2020-01-09 00:04:58 -03:30
inpage.js Add new inpage provider package (#8442) 2020-04-28 17:14:51 -07:00
metamask-controller.js Don't updatePendingTxs outside of block updates (#8445) 2020-04-29 16:01:22 -02:30
phishing-detect.js Replace METAMASK_UI_TYPE global with helper function (#8279) 2020-04-01 19:28:10 -03:00
README.md add READMEs to folders, re #3427 2018-03-14 15:33:22 +02:00
ui.js Remove ineffectual close popup function (#8316) 2020-04-10 12:27:58 -03:00

Main MetaMask Code

This folder contains the core-code.

Currently, it is organized mostly based on file category, like:

controllers, migrations, lib

Ongoing Task

Refactor code-structure, thus the subsystems are reflected on the filesystem.

Examples