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

1880 Commits

Author SHA1 Message Date
Mark Stacey
a44f38e640
Fix PropType warning (#6792) 2019-07-03 22:48:22 -03:00
Akshit Kr Nagpal
687984a938 Added Confirmation Modal for Delete Network (#6776) 2019-07-02 09:43:02 -02:30
Mark Stacey
6d191f2617
Refactor account-details-modal (#6751)
Refactor the AccountDetailsModal to follow newer conventions. Changes
include:
- Create a directory for the component with separate files for the
  component, the container, and the entrypoint.
- Use jsx rather than hyperscript

Fixes #6741
2019-06-27 12:03:18 -03:00
Mark Stacey
313def1ce2 Remove shapeshift deposit form (#6746)
Closes #6478
2019-06-24 14:17:48 -02:30
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
Thomas Huang
6fb0d4af27 Wrap smaller custom block explorer url text (#6714) 2019-06-17 08:32:12 -02:30
Chi Kei Chan
9a1a207ffa
MetaMorph - Spacing and Typeface on Extension Main view (#6584)
* wip

* Style Update: Mobile App Header

* wip

* Style Update: mobile menu-bar

* Style Update: Primary and Secondary balance on mobile main view

* Style Update: Spacing for transaction-list and transaction-list-item

* Address PR Comments

* Fix full-width view

* line-height fixes
2019-06-12 19:56:04 -07:00
Jenny Pollack
9180e39b08 Revert "fixed #5524"
This reverts commit c8cb4ba370.
2019-06-06 19:20:33 +02: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
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
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
Whymarrh Whitby
6aa889280d Add suffix to title text only when it exists (#6546) 2019-05-06 10:55:18 -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
Chi Kei Chan
13605c2b5e
Always show private network when RPC is not whitelisted (#6495) 2019-04-25 13:54:35 -07:00
Chi Kei Chan
429bb5e7aa
Fix button colors on mobile (#6493) 2019-04-24 20:01:41 -07:00
Chi Kei Chan
ec712d5d8f
Set max-width on network dropdown and ellipsis long network name (#6494) 2019-04-24 20:01:24 -07: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
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
Thomas Huang
83f3e8ab98
Merge pull request #6468 from chikeichan/network-indicator-style-fix
Fix switcher height when Custom RPC is selected or loading
2019-04-17 12:42:49 -05:00
Paul Bouchon
0db0a187c8 feature: add Goerli support (#6459) 2019-04-17 15:04:49 -02:30
Chi Kei Chan
597c490928 Fix switcher height when Custom RPC is selected or when network is loading 2019-04-16 23:47:11 -07:00
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
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
Whymarrh Whitby
c4a3d4ea82 Remove unneeded array cloning in getSendToAccounts selector
The use of `Object.entries` here to map the accounts into a new array effectively
produces a shallow clone of the array without guaranteeing the order of the original
array (as object iteration order is implementation-specific and variable). From MDN [1]:

> The **`Object.entries()`** method returns an array of a given object's own enumerable
> string-keyed property `[key, value]` pairs, in the same order as that provided by a
> `for...in` loop

And also:

> The ordering of the properties is the same as that given by looping over the
> property values of the object manually.

Both of which suggest that the iteration order is the same as `for...in`, which is to
say that it's not specified. [2] [3]

This changeset removes the cloning, keeping the shallow clone created the line before
which preserves the order of the items in the array.

  [1]:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/entries
  [2]:https://stackoverflow.com/a/5525820/1267663
  [3]:https://stackoverflow.com/a/30919039/1267663
2019-04-11 21:50:06 -02:30
Sneh Koul
2786932576 repeated getSelectedAddress() func send.selectors.js removed (#6056) 2019-04-11 15:20:03 -02:30
Thomas Huang
d7a2ea9a2b Add Localhost 8545 for network dropdown names 2019-04-10 16:34:13 -05:00
Dan Miller
5d948360c0 Distinguish between token and eth selected in home screen send button metrics event. 2019-04-08 11:06:13 -02:30
Dan Miller
5454266d7c Metrics tracking gas changed - slow, average, fast, custom - on edit screen.- 2019-04-08 11:06:05 -02:30
kumavis
cf4eac3f2c
Merge pull request #6397 from MetaMask/wyre-deposit-modal
Change coinbase to wyre
2019-04-04 10:16:26 +08:00
Thomas Huang
6a80ff2718 Change coinbase to wyre 2019-04-03 16:45:43 -05:00
Dan J Miller
95a2480074 Fix display of gas chart on Ethereum networks (#6389) 2019-04-03 13:31:43 -02:30
Thomas Huang
a46ec83c9b Remove NoticeController (#6382) 2019-04-01 22:33:54 -02:30
Whymarrh Whitby
4055dc3475
Remove unused account-dropdowns components (#6363) 2019-04-01 14:25:33 -02:30
Chi Kei Chan
adcf03eacc About tab copy changes; Update route for Info & Help in account menu (#6356) 2019-03-29 13:54:03 -02:30
kumavis
133ed80aee
Merge pull request #6372 from MetaMask/addAddressIfNew
prevent add duplicates when address is not new
2019-03-29 13:48:15 +08:00
kumavis
0961449ca0 send-footer.utils.js - addressIsNew - improve readability 2019-03-29 13:34:49 +08:00
kumavis
38b85adbe0 Merge branch 'develop' of https://github.com/vimalsagar/metamask-extension into vimalsagar-develop 2019-03-29 10:20:19 +08:00
Jenny Pollack
356ef794f2 prevent add duplicates when address is not new 2019-03-28 19:18:53 -07:00
kumavis
b004b182bf
depoit-ether-modal - make buyEth args more explicit 2019-03-29 10:10:05 +08:00
Dan J Miller
ef4894b9a0
Don't include tx value in calculation of balance sufficiency for cancel button disabling. (#6346) 2019-03-26 12:17:36 -02:30
Dan J Miller
2f13a97d00
Cancel error rebased (#6341)
* Check balance before showing cancel

* Fix linter

* Use existing helper methods for calculating increased cancel price

* Add tooltip for disabled button

* Lint fix for cancelError branch.

* Disabling of cancel button should account for value of tx.
2019-03-25 13:55:23 -02:30
Dan J Miller
69f7968c70
Close transaction on close of notification window (#6340) 2019-03-25 13:49:23 -02:30
Dan J Miller
961ad267df
New settings page rebased (#6333)
* New setting tab

* Add InfoTab

* Add Advanced tab

* Add Security Tab

* Finish mobile view

* Make new setting page responsive

* Fix linter

* Fix y scrolling

* Update link in network dropdown

* Fix e2e tests

* Remove duplicate translation key

* Resolve merge conflict

* Only change settings header in popup view.

* Place mobile-sync button in advanced-tab of settings
2019-03-25 13:43:23 -02:30
Dan J Miller
4ff9126ff2
Replaces the coinbase link in the deposit modal with one for wyre (#6302) 2019-03-22 12:32:07 -02:30
Dan J Miller
174ec2d596
Fix oversized loading overlay on gas customization modal. (#6326) 2019-03-22 12:20:37 -02:30
Dan J Miller
2b992d2946
Fix gas fee in the submitted step of the transaction details activity log. (#6301) 2019-03-22 12:20:25 -02:30