mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-29 23:58:06 +01:00
5b5b67a985
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. |
||
---|---|---|
.. | ||
account-import-strategies | ||
controllers | ||
lib | ||
migrations | ||
platforms | ||
background.js | ||
chromereload.js | ||
contentscript.js | ||
first-time-state.js | ||
inpage.js | ||
metamask-controller.js | ||
phishing-detect.js | ||
README.md | ||
ui.js |
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.