From df17853502f2a9cad6bf0067663de9496f67a7b7 Mon Sep 17 00:00:00 2001 From: Whymarrh Whitby Date: Thu, 4 Jul 2019 12:21:21 -0230 Subject: Remove UiMigrationAnnouncement and associated state (#6794) --- development/states/confirm-sig-requests.json | 1 - 1 file changed, 1 deletion(-) (limited to 'development/states/confirm-sig-requests.json') diff --git a/development/states/confirm-sig-requests.json b/development/states/confirm-sig-requests.json index d531b2ef7..e7658aa29 100644 --- a/development/states/confirm-sig-requests.json +++ b/development/states/confirm-sig-requests.json @@ -157,7 +157,6 @@ "preferences": { "useNativeCurrencyAsPrimaryCurrency": true }, - "completedUiMigration": true, "frequentRpcListDetail": [] }, "appState": { -- cgit v1.2.3 From ec40b2a32526a8e28b007905c1ba63395c1042b6 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Thu, 4 Jul 2019 16:18:12 -0300 Subject: 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. --- development/states/confirm-sig-requests.json | 1 - 1 file changed, 1 deletion(-) (limited to 'development/states/confirm-sig-requests.json') diff --git a/development/states/confirm-sig-requests.json b/development/states/confirm-sig-requests.json index e7658aa29..fdbfa5058 100644 --- a/development/states/confirm-sig-requests.json +++ b/development/states/confirm-sig-requests.json @@ -228,7 +228,6 @@ }, "basicEstimateIsLoading": false, "gasEstimatesLoading": false, - "basicPriceAndTimeEstimates": [], "priceAndTimeEstimates": [ { "expectedTime": "1374.1168296452973076627", -- cgit v1.2.3 From 04ae92a2c03c5115b7b5be63ab2d03ef5c78bccd Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Mon, 15 Jul 2019 11:03:22 -0300 Subject: Lint `.json` files (#6852) We've been using the `eslint-plugin-json` plugin for some time, but we haven't been visiting `.json` files in the lint script. The lint script has now been updated to incude `.json` files, which means any invalid JSON will result in a lint error. Unfortunately this JSON plugin doesn't seem to apply the other eslint rules (such as `key-spacing`) to the JSON files. I wasn't able to find a way to get that to work. Instead I manually auto-formatted each of the locale `message.json` files, which fixed many whitespace inconsistencies. The `states.json` file was deleted completely, as it appears to be unused. It wasn't a valid JSON file anyway, it was JavaScript. It looks like a `states.js` file is automatically generated, but an old copy was accidentally saved as `states.json` and included in the repo. Many duplicate key errors were found and fixed in the `development/states/` JSON files. `package-lock.json` was added to `.eslintignore` because it was very slow to lint, and linting it doesn't provide much value. --- development/states/confirm-sig-requests.json | 2 -- 1 file changed, 2 deletions(-) (limited to 'development/states/confirm-sig-requests.json') diff --git a/development/states/confirm-sig-requests.json b/development/states/confirm-sig-requests.json index fdbfa5058..d93723f62 100644 --- a/development/states/confirm-sig-requests.json +++ b/development/states/confirm-sig-requests.json @@ -24,8 +24,6 @@ } }, "cachedBalances": {}, - "unapprovedTxs": {}, - "currentCurrency": "USD", "conversionRate": 1200.88200327, "conversionDate": 1489013762, "noActiveNotices": true, -- cgit v1.2.3