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

3414 Commits

Author SHA1 Message Date
Mark Stacey
8225bbe126
Remove unused current view related things (#7843)
* Remove unused functions from `mapDispatchToProps`

The actions import was also updated to import only the two actions
used, rather than all actions.

* Remove unused container component

Well, technically it was the props injected by this container that were
unused. The container served no purpose, so the component it surrounded
is now used directly instead.

* Remove both unused `getCurrentViewContext` selectors

* Remove unused SHOW_CONFIG_PAGE action

* Remove checks for `currentView` with name `config`

Now that the SHOW_CONFIG_PAGE action has been removed, it's no longer
possible for `currentView.name` to be set to that value.

* Remove unused `wallet-view` container props

* Delete unused SHOW_SEND_PAGE and SHOW_ADD_TOKEN_PAGE actions

* Remove unused `account-menu.container` props

* Remove unused SHOW_INFO_PAGE action

* Remove unused SET_NEW_ACCOUNT_FORM action
2020-01-16 13:02:44 -04:00
Whymarrh Whitby
48c9b0174f
Add required props for TransactionListItemDetails tests (#7834) 2020-01-16 00:04:32 -03:30
Whymarrh Whitby
dcf8eb2187
Fix prop types for GasPriceChart tests (#7836) 2020-01-16 00:03:50 -03:30
Whymarrh Whitby
e642314ae4
Fix prop types for NetworkDropdown tests (#7837) 2020-01-16 00:03:37 -03:30
Whymarrh Whitby
948a2ce831
Fix prop types for SendGasRow component tests (#7833) 2020-01-15 17:44:47 -03:30
Whymarrh Whitby
c53a40c45f
Add required props & fix propTypes for SendFooter tests (#7825) 2020-01-15 13:28:23 -03:30
Mark Stacey
74557bd68a
Delete onBlur handlers from currency and token input components (#7824)
As of #7753, the `onBlur` prop is no longer used for the `token-input`
and `currency-input` components, and the associated wrapper components
and the shared underlying component. It as been removed from all of
them.
2020-01-15 11:18:59 -04:00
Whymarrh Whitby
ab7500a940
Add required props for Send component tests (#7821) 2020-01-14 18:23:22 -03:30
Mark Stacey
00da0d28a0
Use data attributes to reference settings in e2e tests (#7820)
These rows on the Advanced Settings page were being looked up in the
e2e tests by the order they appeared in. Instead they're now referenced
by data id, so that we can add new settings and re-arrange them without
breaking the e2e tests.
2020-01-14 17:27:36 -04:00
Whymarrh Whitby
8b0c95cbb1
Add required props for AdvancedTab component tests (#7819) 2020-01-14 17:45:54 -03:30
Mark Stacey
19f10e197e
Simplify e2e test transaction navigation (#7816)
The transaction navigation in the e2e tests has been made simpler with
the addition of data attributes to help with finding the navigation
buttons. Each button is now labelled according to its purpose.
2020-01-14 14:53:02 -04:00
Mark Stacey
ac01c5c89a
Consistent jsdoc syntax (#7755)
* Specify type before parameter name

Various JSDoc `@param` entries were specified as `name {type}` rather
than `{type} name`.

A couple of `@return` entries have been given types as well.

* Use JSDoc optional syntax rather than Closure syntax

* Use @returns rather than @return

* Use consistent built-in type capitalization

Primitive types are lower-case, and Object is upper-case.

* Separate param/return description with a dash
2020-01-13 14:36:36 -04:00
Whymarrh Whitby
2c3b1a0fe0
Convert ConfirmTxScreen to an ES6 class (#7790)
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-01-13 13:32:54 -03:30
Whymarrh Whitby
61d1809750
Purge xtend from the UI (#7795) 2020-01-13 12:59:21 -03:30
Whymarrh Whitby
b9757f5563
Convert account import components to ES6 classes (#7791)
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-01-13 11:42:53 -03:30
Whymarrh Whitby
f850a17f63
Convert FiatValue component to ES6 class (#7786)
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-01-13 11:42:26 -03:30
Whymarrh Whitby
789dd19677
Convert Network component to an ES6 class (#7784)
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-01-13 11:42:11 -03:30
Whymarrh Whitby
3b3325d191
Convert ReadOnlyInput to functional component (#7788)
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-01-13 11:41:51 -03:30
Whymarrh Whitby
e20163bfda
Convert TokenList component to an ES6 class (#7785)
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-01-13 11:39:38 -03:30
Thomas Huang
428fdee7e3
Remove padding of info circle of advanced gas (#7810) 2020-01-13 07:08:39 -08:00
Whymarrh Whitby
d802e09a8b
Convert Mascot component to an ES6 class (#7787) 2020-01-13 10:42:58 -03:30
Whymarrh Whitby
82ef9674f2
Move util test file alongside subject (#7807) 2020-01-13 10:41:41 -03:30
Thomas Huang
f6de94a6e5
Remove redundant gas selector file (#7805)
One of these two selectors are in use, which is is another file
92971d3c87/ui/app/selectors/custom-gas.js (L44)
2020-01-10 11:11:49 -08:00
Whymarrh Whitby
89e7dc2312
Convert Modal component to ES6 class (#7783) 2020-01-10 15:35:46 -03:30
Whymarrh Whitby
52a38de567
Remove unused components (#7802) 2020-01-10 15:27:48 -03:30
Mark Stacey
0d61f78379
Remove unused PersistentForm (#7770)
This component used to persist form contents to LocalStorage. This was
especially useful for the popup UI, as each time the mouse left the
popup, the UI was completely torn down and state was lost.

This component was only being referenced by one form, and it wasn't
even being used there (e.g. no fields were labelled appropriately to
be persisted).

This was a useful component, and it seems this feature was lost
somewhere in the past couple of years. It was tempting to re-instate it
rather than delete it, but I decided not to because I'd likely approach
the problem differently if we wanted to reinstate it again today (maybe
by using a React Hook, or storing the state in Redux and persisting a
subset of the Redux store instead).
2020-01-10 11:55:27 -04:00
Whymarrh Whitby
fa1482ef76
Convert HideTokenConfirmationModal to an ES6 class (#7782) 2020-01-10 11:51:47 -03:30
Whymarrh Whitby
dadb112df9
Convert MenuDroppoComponent component to an ES6 class (#7781)
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-01-10 11:43:21 -03:30
Mark Stacey
dac83f6188
Make account details modal close button easier to click (#7797)
The account details close button is difficult to click from the e2e
tests because it has a size of zero. The actual icon is added via CSS
as an `::after` pseudo-element.

The CSS has been adjusted to give the icon a size, and it the markup
is now a `button` rather than a `div`.
2020-01-10 10:43:53 -04:00
Mark Stacey
61ab053bb1
Remove unused className prop (#7800)
This prop is not checked by the component it's passed into, and that
class doesn't correspond to any style rules.
2020-01-10 10:43:44 -04:00
Mark Stacey
f20e028cde
Remove unused props, prevent redundant gas update (#7769)
These unused props weren't being caught by ESLint because this
component extended another, which I guess made it difficult for the
React plugin to determine what was unused.

The `componentWillUpdate` logic was moved into `componentDidUpdate` so
that it would be picked up by ESLint. Also it seemed like a sensible
place for it to go. Having three redundant gas updates as part of
the same lifecycle function seemed too far, so I ensured it's
only called once.
2020-01-10 10:39:44 -04:00
Erik Marks
728026d1f7
Fix batch transaction UX (#7473)
* order transactions from oldest to newest in UI

* update json-rpc-engine, eth-json-rpc-middleware

* update e2e and integration tests
2020-01-10 06:34:02 -08:00
Dan J Miller
d349bd61d2
Fix gas estimate for tokens (#7753)
* Make gas estimate update on debounced token amount change, not just on blur after change

* Updated tests

* Ensure `updateGas` is bound early

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-01-10 10:53:54 -03:30
Whymarrh Whitby
3b1cd1286f
Convert TokenMenuDropdown to an ES6 class (#7779) 2020-01-10 10:34:03 -03:30
Whymarrh Whitby
be3ba68e4c
Convert NetworkDropdown to ES6 class (#7778) 2020-01-10 10:33:47 -03:30
Whymarrh Whitby
7f47a42f55
Convert AccountDetailsDropdown to ES6 class (#7777) 2020-01-10 10:33:32 -03:30
Whymarrh Whitby
6947ff49e0
Convert AccountPanel component to ES6 class (#7775) 2020-01-10 10:32:24 -03:30
Whymarrh Whitby
92971d3c87
Migrate codebase to use ESM (#7730)
* Update eslint-plugin-import version

* Convert JS files to use ESM

* Update ESLint rules to check imports

* Fix test:unit:global command env

* Cleanup mock-dev script
2020-01-09 00:04:58 -03:30
Sirius Tsou
9ba3774b5e Fix Kovan and Rinkeby chain IDs (#7762) 2020-01-08 11:26:56 -03:30
Mark Stacey
7bddbf611a
Replace inlined blockies identicon with npm package (#7757)
The "blockies" style identicon is handled by a module that was copied
from MyEtherWallet and inlined. This has been removed, and replaced
with the upstream package it was originally derived from.
2020-01-07 23:55:32 -04:00
ricky
984e5a1e26
Properly handle <enter> keystroke (#7747)
* Properly handle <enter> keystroke, closes #7737

* no-unused-vars
2020-01-07 17:20:29 -05:00
Whymarrh Whitby
c66449f823
Disable semicolons for class props (#7754) 2020-01-07 16:40:44 -03:30
Whymarrh Whitby
8701ac38a1
Remove useless component constructors (#7718) 2019-12-19 18:30:22 -03:30
Whymarrh Whitby
1820836833
Clean up MetaMetricsProvider constructor (#7719) 2019-12-19 14:58:23 -03:30
Whymarrh Whitby
f441f83b16
Remove unused feature-toggle-utils file (#7703) 2019-12-13 13:48:05 -03:30
Whymarrh Whitby
2a8e586142
Remove unused methods from one of the many utils files (#7702) 2019-12-13 11:21:07 -03:30
Mark Stacey
2e188ce4ef
Remove unused fromDropdownOpen state in send reducer (#7700)
The unused state has been removed along with associated actions and
action creators.
2019-12-12 19:26:18 -04:00
Whymarrh Whitby
db0d59f800
Remove unused UI actions (#7675) 2019-12-12 19:48:48 -03:30
Whymarrh Whitby
4b471a4d8a
Adjust colour of Reset Account btn to reflect danger (#7696) 2019-12-12 17:03:05 -03:30
pldespaigne
0ef7f603d6 Ipfs cid v1 base32 (#7362)
add ipfs gateway to advanced settings
use ipfs gateway from settings
use ipfs.dweb.link as default CID gateway
disallow gateway.ipfs.io as gateway
2019-12-12 11:28:07 -08:00