1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00
Commit Graph

24 Commits

Author SHA1 Message Date
Mark Stacey
04ae92a2c0
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.
2019-07-15 11:03:22 -03:00
Thomas Huang
96a12a627e
Merge pull request #6832 from MetaMask/master-rebased
Master rebased
2019-07-12 10:58:19 -07:00
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
Dan J Miller
05e2120814 Version 6.7.2 gas limit fix (#6786)
* Introduce delay for eth_estimateGas calls with in test

* Add test that fails when gas estimates of contract method calls without gas are too high.

* Get transaction gas data from unApprovedTxs instead of confirmTransaction

* Fix selection of gas data in gas-modal-page-container.container

* Lint changes related to Version-6.7.2-gasLimitFix

* Fix e2e tests on Version-6.7.2-gasLimitFix

* Fix unit and integration tests for changes from Version-6.7.2-gasLimitFix

* more e2e fixes

* Add assertions for transaction values on confirm screen

* Fix display of transaction amount on confirm screen.
2019-07-04 14:14:03 -02:30
Whymarrh Whitby
df17853502
Remove UiMigrationAnnouncement and associated state (#6794) 2019-07-04 12:21:21 -02:30
Dan J Miller
13be683701
New settings custom rpc form (#6490)
* Add networks tab to settings, with header.

* Adds network list to settings network tab.

* Adds form to settings networks tab and connects it to network list.

* Network tab: form adding and editing working

* Settings network form properly handles input errors

* Add translations for settings network form

* Clean up styles of settings network tab.

* Add popup-view styles and behaviour to settings network tab.

* Fix save button on settings network form

* Adds 'Add Network' button and addMode to settings networks tab

* Lint fix for settings networks tab addition

* Fix navigation in settings networks tab.

* Editing an rpcurl in networks tab does not create new network, just changes rpc of old

* Fix layout of settings tabs other than network

* Networks dropdown 'Custom Rpc' item links to networks tab in settings.

* Update settings sidebar networks subheader.

* Make networks tab buttons width consistent with input widths in extension view.

* Fix settings screen subheader height in popup view

* Fix height of add networks button in popup view

* Add optional label to chainId and symbol form labels in networks setting tab

* Style fixes for networks tab headers

* Add ability to customize block explorer used by custom rpc

* Stylistic improvements+fixes to custom rpc form.

* Hide cancel button.

* Highlight and show network form of provider by default.

* Standardize network subheader name to 'Networks'

* Update e2e tests for new settings network form

* Update unit tests for new rpcPrefs prop

* Extract blockexplorer url construction into method.

* Fix broken styles on non-network tabs in popup mode

* Fix block explorer url links for cases when provider in state has not been updated.

* Fix vertical spacing of network form

* Don't allow click of save button on network form if nothing has changed

* Ensure add network button is shown in popup view

* Lint fix for networks tab

* Fix block explorer url preference setting.

* Fix e2e tests for custom blockexplorer in account details modal changes.

* Update integration test states to include frequentRpcList property

* Fix some capitalizations in en/messages.json

* Remove some console.logs added during custom rpc form work

* Fix external account link text and url for modal and dropdown.

* Documentation, url validation, proptype required additions and lint fixes on network tab and form.
2019-05-09 14:57:14 -02:30
Dan Miller
936cbd7ec0 Prevent completedUiMigration popup from appearing in integration tests. 2019-05-07 15:29:59 -02:30
Chi Kei Chan
a2320c76fe Show/Hide Fiat on Testnets based on User Preference (#6153) 2019-02-26 15:00:41 -03:30
Dan J Miller
02bdbbbc3e Add visual indicator when displaying a cached balance (#5854) 2019-01-30 08:46:12 -03:30
Esteban Miño
2d7c9b3dac Prevent send to token warning (#6058) 2019-01-23 14:39:56 -03:30
Alexander Tseung
fba17d77de Refactor first time flow, remove seed phrase from state (#5994)
* Refactor and fix styling for first time flow. Remove seed phrase from persisted metamask state

* Fix linting and tests

* Fix translations, initialization notice routing

* Fix drizzle tests

* Fix e2e tests

* Fix integration tests

* Fix styling

* Fix migration naming from 030 to 031

* Open extension in browser when user has not completed onboarding
2019-01-23 11:55:34 -03:30
Alexander Tseung
30a2be85ee
Prevent users from changing the From field in the send screen (#5922)
* Prevent users from changing the From field in the send screen

* Fix integration tests
2018-12-13 18:19:36 -08:00
Dan J Miller
1fbdce8916 Improve ux for low gas price set (#5862)
* Show user warning if they set gas price below safelow minimum, error if 0.

* Properly cache basic price estimate data.

* Default retry price to recommended price if original price was 0x0

* Use mock fetch in send-new-ui integration tests.
2018-12-10 13:51:00 -08:00
Dan Miller
b7f873b96e Add gas data to integration test json data set. 2018-12-04 00:06:22 -03:30
Dan Finlay
5043451356
Merge pull request #5167 from MetaMask/fix-watcAsset-images
Fix images for watched tokens
2018-09-04 12:56:56 -07:00
Esteban MIno
879e10d44a add assetImages to development states 2018-08-30 17:25:13 -03:00
Dan Miller
40e0d92f57 Adds sidebar component and refactors slide in wallet view sidebar to use it. 2018-08-28 22:08:15 -02:30
Dan
91eca558f0 Fix send integration tests for compatability with confirm refactor. 2018-07-11 08:35:15 -02:30
Dan
ae55e8a3c1 Merge branch 'develop' into i3725-refactor-send-component- 2018-06-06 16:40:43 -02:30
Whymarrh Whitby
6ee9685490 Fix mock addresses used for integration tests 2018-06-05 19:48:42 -07:00
Dan
33c16d1bf6 Fixes to get tests passing. 2018-04-27 08:11:18 -02:30
Dan
cd204ee803 Add currentLocale to test states. 2018-03-23 15:42:54 -02:30
Dan
f8e13fd793 Fix tests. 2018-03-14 12:28:26 -02:30
Dan J Miller
b63f0f3de2 Functional Integration Tests for send ether flow. (#3119) 2018-01-29 17:24:53 -08:00