1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +01:00
metamask-extension/development/states
Mark Stacey ec40b2a325
Check for invalid gas estimates from local storage (#6800)
* Remove unused state 'gas.basicPriceAndTimeEstimates'

* Check for invalid estimates from local storage

Gas estimates were being cached in local storage then later retrieved,
but the retrieved values were not being checked. If the data failed to
save, failed to load, or was cleared since being saved, it would result
in the gas estimates being set to undefined.

The estimates retrieved from local storage are now checked before they
are used. If they are falsy, the estimates are retrieved from the
network instead.

This should fix this Sentry issue:
[METAMASK-6W0T](https://sentry.io/share/issue/cfe470314a5741768b19050815322aa4/)

A few additional changes were made to the gas-duck tests to accommodate
the use of `sinon.restore`. `restore` is strongly recommended by the
`sinon` team, as neglecting to use it can result in memory leaks. It has
the additional benefit of ensuring you create fresh stubs/spies for each
test, which means they no longer need to be reset between tests.
2019-07-04 16:18:12 -03:00
..
account-detail-with-shapeshift-tx.json Fix development to use new currency state. 2017-03-14 17:05:27 -07:00
account-detail-with-transaction-history.json Fix development to use new currency state. 2017-03-14 17:05:27 -07:00
account-detail.json Fix development to use new currency state. 2017-03-14 17:05:27 -07:00
account-list-with-imported.json Fix development to use new currency state. 2017-03-14 17:05:27 -07:00
accounts-loose.json Fix development to use new currency state. 2017-03-14 17:05:27 -07:00
accounts.json Fix development to use new currency state. 2017-03-14 17:05:27 -07:00
add-token.json Prevent send to token warning (#6058) 2019-01-23 14:39:56 -03:30
compilation-bug.json Fix development to use new currency state. 2017-03-14 17:05:27 -07:00
conf-tx.json New settings custom rpc form (#6490) 2019-05-09 14:57:14 -02:30
config.json Fix development to use new currency state. 2017-03-14 17:05:27 -07:00
confirm-new-ui.json Check for invalid gas estimates from local storage (#6800) 2019-07-04 16:18:12 -03:00
confirm-sig-requests.json Check for invalid gas estimates from local storage (#6800) 2019-07-04 16:18:12 -03:00
create-vault-password.json Delete all code related to disclaimers. 2017-02-09 18:17:50 -08:00
currency-localization.json Check for invalid gas estimates from local storage (#6800) 2019-07-04 16:18:12 -03:00
custom-rpc.json Delete all code related to disclaimers. 2017-02-09 18:17:50 -08:00
empty-account-detail.json Delete all code related to disclaimers. 2017-02-09 18:17:50 -08:00
first-time.json Add support for RPC endpoints with custom chain IDs (#5134) 2018-10-26 10:26:43 +02:00
help.json Delete all code related to disclaimers. 2017-02-09 18:17:50 -08:00
import-private-key-warning.json Fix development to use new currency state. 2017-03-14 17:05:27 -07:00
import-private-key.json Fix development to use new currency state. 2017-03-14 17:05:27 -07:00
locked.json Fix development to use new currency state. 2017-03-14 17:05:27 -07:00
lost-accounts.json Fix development to use new currency state. 2017-03-14 17:05:27 -07:00
navigate-txs.json feature: add Goerli support (#6459) 2019-04-17 15:04:49 -02:30
new-account.json Fix development to use new currency state. 2017-03-14 17:05:27 -07:00
new-vault.json Delete all code related to disclaimers. 2017-02-09 18:17:50 -08:00
notice.json notices - replace getLatestNotice with getNextNotice 2018-06-13 23:30:31 -07:00
pending-crash.json Delete all code related to disclaimers. 2017-02-09 18:17:50 -08:00
pending-signature.json Fix development to use new currency state. 2017-03-14 17:05:27 -07:00
pending-tx-insufficient.json Fix development to use new currency state. 2017-03-14 17:05:27 -07:00
pending-tx.json feature: add Goerli support (#6459) 2019-04-17 15:04:49 -02:30
personal-sign.json Fix development to use new currency state. 2017-03-14 17:05:27 -07:00
private-key-export-success.json Add new development states for UI development. 2017-03-21 08:52:28 -07:00
private-key-export.json Add new development states for UI development. 2017-03-21 08:52:28 -07:00
private-network.json Fix development to use new currency state. 2017-03-14 17:05:27 -07:00
restore-vault.json Fix development to use new currency state. 2017-03-14 17:05:27 -07:00
send-edit.json Check for invalid gas estimates from local storage (#6800) 2019-07-04 16:18:12 -03:00
send-new-ui.json Check for invalid gas estimates from local storage (#6800) 2019-07-04 16:18:12 -03:00
send.json New settings custom rpc form (#6490) 2019-05-09 14:57:14 -02:30
shapeshift.json Fix development to use new currency state. 2017-03-14 17:05:27 -07:00
show-seed-words.json Delete all code related to disclaimers. 2017-02-09 18:17:50 -08:00
terms-and-conditions.json Fix development to use new currency state. 2017-03-14 17:05:27 -07:00
tx-list-items.json Check for invalid gas estimates from local storage (#6800) 2019-07-04 16:18:12 -03:00