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

1263 Commits

Author SHA1 Message Date
Mark Stacey
1112277cd6
Remove seedWords completely from metamask state (#6920)
`seedWords` used to be stored on the metamask state temporarily at
certain points. This hasn't been the case since #5994, but references
to this state remained. All of the logic remained for correctly updating
these `seedWords`, handling them during navigation, and scrubbing them
from the state.

However the state was never updated in practice. The `seedWords` are
still returned by `verifySeedPhrase`, and they're still stored in
component state in a few places. But they aren't ever set in the Redux
metadata state or the Preferences controller.

All references to this state have been removed, along with any logic
for interacting with this state. A few unused actions were removed as
well.
2019-07-26 10:35:21 -03:00
Mark Stacey
32fffe53f5
Remove Drizzle tests (#6855)
The Drizzle tests have not been used for some time. They were used to
ensure compatibility with newer versions of `web3` v1. If we want to
re-add tests to ensure compatibility with newer `web3` versions, we
should find some way of doing that more reliably than was done here -
these tests were somewhat flaky and unreliable.
2019-07-15 17:10:46 -03:00
Thomas Huang
96a12a627e
Merge pull request #6832 from MetaMask/master-rebased
Master rebased
2019-07-12 10:58:19 -07:00
Whymarrh Whitby
caa40912ac
Replace deprecated shell-parallel with concurrently (#6807)
* Replace shell-parallel with concurrently

* Update ganache-cli
2019-07-09 14:09:31 -02:30
Whymarrh Whitby
b7f3f26ebf
Remove job-screens CI job (#6823)
* Remove job-screens CI job
* Remove unused dependencies, now that job-screens is gone
2019-07-08 17:02:15 -02:30
Dan J Miller
32a3f5ad7b
Address various UI styling issues (#6744)
* Add loading spinner to pending tx status label.

* Add border around account icon in top right

* Change style of settings toggle buttons; wrap with local components

* Eliminate large space after settings labels when no description

* Remove network form from advanced tab of settings

* Keep new account container height to contents when in full screen
2019-07-08 15:28:35 -02:30
Mark Stacey
95f198550e
Declare variables before use (#6806)
While working on #6805, I noticed that many variables were being used
before they were declared. Technically this worked fine in practice
because we were using the `transform-es2015-block-scoping` Babel plugin,
which transforms `let` and `const` to `var`, which is hoisted. However,
after removing that Babel transformation, many things broke.

All instances of variables or classes being used before declared have
been fixed.

The `no-use-before-define` eslint rule has been added to catch these
cases going forward. The rule is disabled for function declarations for
the moment, because those are always hoisted. We could disable that too
if we want to, but it's purely stylistic and would require a lot more
changes.
2019-07-05 14:01:34 -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
5737df249d
Move e2e tests out of beta dir (#6785) 2019-07-02 23:19:59 -02:30
Akshit Kr Nagpal
687984a938 Added Confirmation Modal for Delete Network (#6776) 2019-07-02 09:43:02 -02:30
Dan Finlay
448720327b
Merge pull request #6765 from MetaMask/master
Using admin privilege to bypass code owner review because it has already [been reviewed](https://github.com/MetaMask/metamask-extension/pull/6763) and those code owners are out today.
2019-07-01 10:58:25 -07:00
Akshit Kr Nagpal
d16d6f483c Validate txParams in TransactionStateManager.addTx (#6713)
* Normalize and Validate txParams in TransactionStateManager.addTx too

* Added Tests

* Updated normalizeAndValidateParams to return the new txParams
2019-06-29 00:51:51 +02:00
Dan Miller
0e108db3cc Adds e2e tests that fail when token decimals are displaying incorrectly. 2019-06-28 01:51:33 -03:00
Whymarrh Whitby
748801f417 4byte fallback (#6551)
* Adds 4byte registry fallback to getMethodData() (#6435)

* Adds fetchWithCache to guard against unnecessary API calls

* Add custom fetch wrapper with abort on timeout

* Use opts and cacheRefreshTime in fetch-with-cache util

* Use custom fetch wrapper with timeout for fetch-with-cache

* Improve contract method data fetching (#6623)

* Remove async call from getTransactionActionKey()

* Stop blocking confirm screen rendering on method data loading, and base screen route on transactionCategory

* Remove use of withMethodData, fix use of knownMethodData, in relation to transaction-list-item.component

* Load data contract method data progressively, making it non-blocking; requires simplifying conf-tx-base lifecycle logic.

* Allow editing of gas price while loading on the confirm screen.

* Fix transactionAction component and its unit tests.

* Fix confirm transaction components for cases of route transitions within metamask.

* Only call toString on id if truthy in getNavigateTxData()

* Fix knownMethodData retrieval and data fetching from fourbyte
2019-06-18 09:47:14 -02:30
Dan J Miller
18179fd345 Add delete to custom RPC form (#6718, #6650) 2019-06-17 11:35:47 -02:30
Paul Bouchon
47024fd9a5
feature: integrate gaba/CurrencyRateController (#6570) 2019-05-31 18:14:22 -04:00
Frankie
2b5c7b82a9
transactions/deps - use broken out nonce-tracker module (#6555) 2019-05-21 17:17:09 +02:00
Etienne Dusseault
0e9c8fb5cc Improved UX for sweeping accounts (#6488)
* Changed max button to checkbox, disabled input if max mode is on, recalculate price according to gas fee if max mode is on

* Disabled insufficient funds message in the modal if max mode is on, displays proper amounts in modal when max mode is on, sets the send amount according to custom gas price after gas modal save, resets the send amount after resetting custom gas price

* Disabled max mode checkbox if gas buttons are loading, refactored gas-modal-page-container

* Implemented new max button & max mode message. Moved insufficient funds error to underneath the send amount field

* Fixed existing integration test to pass, created new tests to ensure send amount field is disabled when max button is clicked and the amount changes when the gas price is changed. Refactored some components
2019-05-20 14:08:08 -02:30
Frankie
a34103987a
drop transactions who's nonce is lower then the known network nonce but were not included in a block (#6388)
* transactions/pending - check nonce against the network and mark as dropped if not included in a block

* transactions/pending - unifiy "dropped" txs

* transactions/pending - test - fix for new expected behavior

* fix comment

* transactions/pending - clean up dropped event

* fix spelling

Co-Authored-By: frankiebee <frankie.diamond@gmail.com>

* nit fix

* test/tx-pending - clarify test description
2019-05-16 07:36:53 +02:00
Dan J Miller
c043132b00
Adds e2e test for removing imported accounts. (#6615) 2019-05-15 14:10:11 -02:30
Paul Bouchon
e57ffbed59
feature: integrate gaba/ShapeShiftController (#6569) 2019-05-14 14:38:55 -04:00
Dan J Miller
b81c4e5c98 Set a default value for code in _determineTransactionCategory (#6604)
* Set a default value for code in _determineTransactionCategory

* Adds e2e tests that fail when token txs without gas param are not properly handled.

* Adds unit tests for _determineTransactionCategory

* Base error throwing and simple gas setting in estimateTxGas on transactionCategory
2019-05-14 14:14:07 -04:00
Thomas Huang
08e8fb21dc
Merge pull request #6568 from MetaMask/feature/gaba-phishing-controller
feature: integrate gaba/PhishingController
2019-05-10 13:43:20 -07:00
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
bitpshr
77d3bc252d feature: integrate gaba/PhishingController 2019-05-08 17:56:52 -04:00
Whymarrh Whitby
094e4cf555 Check for unused function arguments (#6583)
* eslint: Check for unused function arguments

* eslint: Ignore unused '_' in argument list

Also allow any number of '_' e.g., '__' or '___' which is to be used sparingly

* Remove and rename unused arguments
2019-05-08 15:51:33 -04:00
Thomas Huang
090d4a8367
Merge pull request #6577 from MetaMask/fix-integration-tests
Fix integration tests: completedUiMigration state and fetch + ethquery mocking
2019-05-07 11:14:25 -07:00
Dan Miller
b481497246 Fix fetch and ethquery mocks in integration tests 2019-05-07 15:27:20 -02:30
Whymarrh Whitby
1de7dc9b41 Remove nock#restore call from actions.spec.js
This call was unmocking all of our HTTP requests, allowing further test cases
to hit the network. Calling nock#restore should not be required.
2019-05-07 13:48:50 -02:30
Chi Kei Chan
3519e90ffd Make height consistent on all row in send-content (#6480)
* Update all send-content row to 54px height

* Remove header subtitle

* Remove tests that check for send screen subheader
2019-04-18 00:41:04 -02:30
Chi Kei Chan
d8b536982e
Update confirm to use btn-primary (#6473)
* Update confirm to use btn-primary

* Remove console

* Fix e2e test
2019-04-17 13:34:47 -07:00
Chi Kei Chan
931aaeb700 Add token selection to the send screen (#6445)
* Move send to pages/

* Fix unit tests

* Finish UI

* Integrate asset dropdown to send actions

* Remove console.log

* Hide asset change during edit

* Enable switch from send token to seand eth

* Enable switching from token to eth when editing

* Fix linter

* Fixing test

* Fix unit tests

* Fix linter

* Fix react warning; remove console.log

* fix flat test

* Add metrics

* Address code review comments

* Consistent spacing between send screen form rows.

* Reduce height of gas buttons on send screen.

* Make send screen gas button height dependent on size of contents.
2019-04-17 16:45:13 -02:30
Paul Bouchon
0db0a187c8 feature: add Goerli support (#6459) 2019-04-17 15:04:49 -02:30
Chi Kei Chan
92c03bdff2 Update buttons & colors to match design system (#6446)
* Refactoring button styles

* renaming buttons

* Add Link and Button styles

* Update new btn styles and storybook

* Fix tests

* Change font weight; Update storybook

* Fix linter
2019-04-16 17:05:22 -02:30
Sneh Koul
fb22fb12ca Adds e2e test for most web3 methods that dapps use (#6160)
* schema added

* ui for the dapp added and schema.js changed according to the comments in PR

* added tests for all web3 methods

* Update run-all.sh

* Update web3.spec.js to work with new onboarding flow

* changes made according to the comments

* Create stand alone script for web3 e2e tests.

* Lint fixes for web3 e2e tests.
2019-04-16 15:29:11 -02:30
Thomas Huang
a46ec83c9b Remove NoticeController (#6382) 2019-04-01 22:33:54 -02:30
Dan J Miller
19c2b298f1
Further e2e fixes in wake of #6364 and #6367 (#6374)
* getMethodData() default to abi decoded method if registry lookup errors

* Update e2e tests to work with getMethodData() fallback changes

* Remove indeterminency in gas input key entering in send token e2e test.
2019-03-29 12:18:08 -02:30
Whymarrh Whitby
125a95ba71
Merge pull request #6364 from MetaMask/prevent-infura-requests-e2e-tests
Prevent infura requests in e2e tests
2019-03-29 11:27:05 -02:30
Whymarrh Whitby
3113114d51 Split e2e run-all commands onto multiple lines 2019-03-29 11:15:01 -02:30
Dan Miller
5a1545b3e4 Run from-import e2e tests with additional account, to avoid conflict with accounts in earlier test runs 2019-03-29 11:13:39 -02:30
Dan Miller
d927a3c20a Use localhost instead of mainnent/infura for custom rpc tests in e2e tests. 2019-03-29 11:13:39 -02:30
Whymarrh Whitby
99f53f5827 e2e: Update Contract Interaction wording 2019-03-29 11:13:20 -02:30
Whymarrh Whitby
643ddcb7d7 e2e: Skip approving token test 2019-03-29 11:13:09 -02:30
kumavis
ed381f5b2a test - unit - ui - actions - setCompletedOnboarding - fix stub to call callback 2019-03-29 13:10:42 +08:00
kumavis
02585c0bd0 lint fix 2019-03-29 12:51:54 +08:00
kumavis
846038a69c notice-controller - make markAllNoticesRead sync 2019-03-29 12:39:29 +08:00
kumavis
e04f0c877b lib - nodeify - correctly wrap synchronous functions 2019-03-29 12:37:40 +08:00
kumavis
a64855ef49 notices - markAllNoticesRead - use async/await 2019-03-29 12:03:31 +08:00
kumavis
781a39c039 Merge branch 'develop' into clearNotices 2019-03-29 11:54:12 +08:00
Whymarrh Whitby
dfe8287a28 e2e: Remove Privacy mode toggle step 2019-03-28 18:20:37 -02:30