1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-23 03:36:18 +02:00
Commit Graph

62 Commits

Author SHA1 Message Date
Terry Smith
ded3dc1381 Add translation support for Learn more and All done on end-of-flow (#6847) 2019-07-14 23:22:20 -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
2eea388680
Remove unused expressions (#6839)
Unused expressions are generally a mistake, as they don't do anything.
The exceptions to this rule (short-circuit expressions and ternary
expressions) have been allowed.

The `webrtc-adapter` was previously ignored by eslint because it has a
side-effect upon being imported. I removed the local variable instead,
which should preserve the same side-effect without making eslint
complain.
2019-07-12 12:41:39 -03:00
ryanml
daccb06a60 Create MetaFoxLogo component (#6819) 2019-07-09 14:47:58 -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
df17853502
Remove UiMigrationAnnouncement and associated state (#6794) 2019-07-04 12:21:21 -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
Dan Miller
789fc8b8ad Fixes display of confirm screen token decimals by not relying on confirmTransaction state. 2019-06-28 01:51:33 -03:00
Whymarrh Whitby
d566543bf5
Handle invalid strings during seed phrase import (#6743)
* Add tests for ImportWithSeedPhrase#parseSeedPhrase

* Handle importing whitespace-only seed phrases

Fixes #6694

This changeset fixes our parsing of seed phrases during import to handle the
case where a user tries to import a seed phrase that consists solely of whitespace.
We no longer produce an error and instead treat it as an incorrect seed phrase.

* Handle importing more invalid seed phrases
2019-06-27 14:44:41 -02:30
Mark Stacey
a6bfc6f441
Fix seed phrase import back button (#6758)
The back button on the import seed phrase page leaves the Redux store
with `appState.forgottenPassword` set to true, which prevents the user
from logging in. That flag is now unset when the user leaves the page.

Fixes #6740
2019-06-27 12:26:25 -03:00
ryanml
59d3a3d312 Fixes #6760, correct PropTypes for nextRoute (#6761) 2019-06-27 10:41:16 -02:30
Thomas
a37a5acbe1 Add simulation failure to tx confirmation when transaction simulationFails 2019-06-25 12:42:35 -07: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
Kirill Goncharov
a47370057e Fix styles on 'import account' page, update help link (#6700)
* Fix styles on 'import account' page, update help link

* Update changelog
2019-06-17 08:37:34 -02:30
Esteban Miño
71390db4a3
Feature: sync with mobile v2 (#6673)
* handle two steps

* generate new qr each 30 secs

* handle change of channel cipher without changing qr code

* fix typo
2019-06-12 10:54:45 -04:00
Jenny Pollack
9180e39b08 Revert "fixed #5524"
This reverts commit c8cb4ba370.
2019-06-06 19:20:33 +02:00
Mathew Kamkar
79d2eaffac
lint cleanup 2019-05-24 22:16:56 -07:00
Mathew Kamkar
c7266067ce
Enable Ledger hardware wallet support on Firefox
Firefox 67 support U2F by default
2019-05-24 21:42:48 -07:00
Dan J Miller
5e2fd8ae86
Ensures that transactions cannot be confirmed if gas limit is below 21000. (#6625) 2019-05-23 11:26:40 -02:30
Whymarrh Whitby
5f307040f2 Remove unused fn arguments in AmountMaxButton 2019-05-20 15:06:28 -02:30
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
Alex Ivasyuv
c8cb4ba370 fixed #5524 2019-05-14 22:00:53 +03:00
Whymarrh Whitby
28c4001f52 Update auto-logout to recognize idle time in background (#6593)
* Fix wording of autoLogoutTimeLimitDescription

* AppStateController and update auto-logout functionality
2019-05-13 13:46:09 -02:30
Whymarrh Whitby
0cdce533e2 Fix RPC URL message key casing (#6595) 2019-05-10 11:54:52 -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
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
Chi Kei Chan
56ed189aeb
Auto logout after specific time (#6558)
* Add i18n strings

* Finish Auto timeout

* Fix linter

* Fix copies

* Add unit test to Advanced Tab component

* Add back actions and container

* Add basic test to ensure container completeness

* No zero, fix linters

* restrict negative in input
2019-05-08 11:57:21 -07:00
Chi Kei Chan
0497d209b2
Remove KNOWN_ADDRESS_ERROR from error objects (#6578)
* Remove KNOWN_ADDRESS_ERROR from error objects

* Update test comments
2019-05-08 10:34:56 -07:00
Whymarrh Whitby
d730da8caa Use metricsEvent in AmountMaxButton component 2019-05-07 13:48:50 -02:30
Chi Kei Chan
581128503c Allow dragging seed phrase during Confirm Seed Phrase (#6557)
* Add basic drag and drop functionality

* Refactor seed phrase data structure

* Insert to list when drop

* Save before refactor

* Finish DND

* Fix linter

* update package-lock.json

* Address styling feedbacks

* Add box shadow on hover

* Finish adding unit tests

* Remove describe.only
2019-05-07 12:33:26 -02:30
kumavis
2845398c3d Refactor ProviderApprovalController to use rpc and publicConfigStore (#6410)
* Ensure home screen does not render if there are unapproved txs (#6501)

* Ensure that the confirm screen renders before the home screen if there are unapproved txs.

* Only render confirm screen before home screen on mount.

* inpage - revert _metamask api to isEnabled isApproved isUnlocked
2019-05-03 13:32:05 -04:00
Whymarrh Whitby
e6b9b5c5a9 Use tOrKey for actionKey in ConfirmTransactionBase 2019-05-01 00:23:19 -02:30
Chi Kei Chan
0095889408 Add subheader to all settings subviews (#6502)
* Add subheader to all settings subviews

* add margin right to subheader
2019-04-29 03:48:03 -02:30
Dan J Miller
39b7145423
Ensure home screen does not render if there are unapproved txs (#6501)
* Ensure that the confirm screen renders before the home screen if there are unapproved txs.

* Only render confirm screen before home screen on mount.
2019-04-27 06:59:55 -02:30
Thomas Huang
608796398e Revert "Adds 4byte registry fallback to getMethodData() (#6435)"
This reverts commit 09f2a2a547.
2019-04-26 10:05:38 -07:00
Thomas Huang
4fa9576cc1
Merge pull request #6481 from MetaMask/address-prop-types-errors
Address prop types errors
2019-04-18 08:22:45 -06:00
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
Thomas Huang
ed23801490
Merge pull request #6477 from MetaMask/metrics-screen-button-type
Update button type on metrics opt-in screen.
2019-04-17 18:26:43 -06:00
Dan Miller
cca73f33f3 Update button type on metrics opt-in screen. 2019-04-17 21:44:39 -02:30
Dan Miller
8a82e629bf Ensure future tokens add decimals as numbers while supporting numbers and strings in send-asset-row 2019-04-17 21:26:25 -02:30
Chi Kei Chan
ed28ca60e0 Fix PropTypes validation in send-asset-row 2019-04-17 13:50: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
Thomas Huang
00133d31b1
Merge pull request #6444 from MetaMask/localhost-network-dropdown
Fixes #6321 & #6421 - Add Localhost 8545 for network dropdown names
2019-04-16 14:39:00 -05:00
Dan J Miller
09f2a2a547
Adds 4byte registry fallback to getMethodData() (#6435)
* Get contract method data from 4byte if we can't get it from eth-method-registry

* Clarify token method name fallback code in getMethodData

* Bugfix: don't attempt to translate falsy actionKeys in confirm-transaction-base.component.js

* Rewrite getMethodFrom4Byte with async-await

* Call four byte and method-registry requests in parallel in getMethodData()
2019-04-16 17:07:47 -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