1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/app/scripts
Dan Finlay c7233e2cc7
Fixed Vivek's bug (#5860)
* Fixed Vivek's bug

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.

* Fixed reference

* Fixed infinite loop bug

Was refreshing the tx list on every tx state change instead of just
network changes, creating an infinite loop.

* Add notes to tx updates to clarify logs
2018-11-29 16:08:03 -08:00
..
account-import-strategies account-import-strategies - ensure privateKey is prefixed before converting to buffer 2018-06-13 21:06:33 -07:00
controllers Fixed Vivek's bug (#5860) 2018-11-29 16:08:03 -08:00
lib ESLint fixes (#5775) 2018-11-16 14:54:55 -10:00
migrations Auto fail transactions that have been approved for over 12 hours (#5765) 2018-11-16 21:27:01 -08:00
platforms EIP-1102: updated implementation 2018-11-05 15:07:09 -08:00
background.js Open full-screen UI on install 2018-11-27 09:52:51 -03:30
chromereload.js
contentscript.js 1102: use meta title if it exists before title 2018-11-14 10:43:10 -08:00
edge-encryptor.js Clean up JSDoc for background scripts 2018-04-19 15:14:00 -04:00
first-time-state.js controllers - network - move default config out of first-time-state 2018-05-02 18:03:59 -07:00
inpage.js 1102: Push publicConfigStore to next turn to avoid race conditiono (#5777) 2018-11-18 07:23:04 -05:00
metamask-controller.js Use Array.includes 2018-11-26 13:27:49 -05:00
notice-controller.js Default NoticeController ctor opts to empty obj 2018-09-11 12:12:35 -07:00
phishing-detect.js Soften accusatory language on phishing warning 2018-11-28 08:35:03 -08:00
popup-core.js eslint --fix . 2018-07-02 18:49:33 -04:00
README.md add READMEs to folders, re #3427 2018-03-14 15:33:22 +02:00
ui.js Default to the new UI for first time users 2018-11-20 14:04:17 -03:30

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