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

3887 Commits

Author SHA1 Message Date
Brad Decker
b92475ac7c
Colocate alert styles (#9117) 2020-08-05 08:43:21 -05:00
Brad Decker
723e478689
move currency-display styles to where they are used (#9119) 2020-08-05 08:43:07 -05:00
Brad Decker
943d637cd2
remove unused tx-list styles (#9121) 2020-07-31 09:17:43 -05:00
Brad Decker
1c46715b46
delete unused confirm styles (#9118) 2020-07-31 09:17:29 -05:00
Brad Decker
1207d43945
update email us to contact us (#9104) 2020-07-29 16:05:19 -05:00
Brad Decker
46ba1ef100
Update font family globally (#9073) 2020-07-29 15:04:02 -05:00
Mark Stacey
b7715f6e70
Only log error on first occurrence of missing substitution (#9096)
A missing substitution for a localized message will now only log an
error upon the first occurrence. Further errors are generally not
useful.
2020-07-29 13:09:52 -03:00
Brad Decker
1582855e28
Use mixins for typography instead of placeholder selectors (#9072)
Using extend would not work inside of some css, namely
inside of media queries. This made it a clear choice to
use mixins for these styles.
2020-07-29 10:35:53 -05:00
Brad Decker
4cc3fff96a
Update css folder structure (#9071) 2020-07-28 15:16:30 -05:00
Mark Stacey
8a7c8e8aeb
Use environment variable for MetaMetrics project ID (#9094)
The MetaMetrics project ID can now be set via environment variable. It
has not been set yet in practice, so for now the old project IDs will
still be used. This is in preparation for migrating to a new project.
2020-07-28 16:59:27 -03:00
Mark Stacey
1e0ef76524
Use development metametrics project during tests (#9093)
e2e tests will now reference the development MetaMetrics project
instead of the production one. The metrics endpoint should be stubbed
out during e2e tests anyway, but this seemed like a better default
regardless.
2020-07-28 16:09:20 -03:00
Brad Decker
13aafa4702
Add euclid fontface (#9018) 2020-07-27 17:15:44 -05:00
ryanml
d9f07a796d
Complete onboarding upon importing/verifying seed (#8873)
Fixes #8679
2020-07-27 18:03:26 -03:00
Brad Decker
57715a8da1
support longer text in network dropdown (#9085) 2020-07-27 15:01:21 -05:00
ryanml
b4663eb78b
Fixes MetaMask/metamask-extension#8626 - verifies password on requesting seed phrase (#9063) 2020-07-24 19:47:40 -03:00
Brad Decker
df8eb494fe
Updates Typography Variables and styles. (#9017)
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-07-24 11:26:45 -05:00
Bakhtiiar Muzakparov
1747f91bf1
Add tooltip to contacts (#8974)
Fixes #8790
2020-07-24 11:17:03 -03:00
Thomas Huang
17e9d85401
Resolve on 0x (#9048) 2020-07-22 11:05:23 -07:00
Mark Stacey
a0589d3290
Remove unused with-method-data HOC (#9050)
This higher-order-component has been unused since #6551
2020-07-22 12:41:16 -03:00
Whymarrh Whitby
bf6578c6b8
Enable guard-for-in rule (#9000) 2020-07-21 18:40:45 -02:30
Brad Decker
35a6ad98b3
Add accent-color usage from design system. (#9009) 2020-07-21 11:17:02 -05:00
Brad Decker
e463a47588
do not show amounts for approvals (#9032) 2020-07-21 10:45:14 -05:00
Whymarrh Whitby
2389777244
Fix invalid CSS rules (#9039) 2020-07-20 15:26:44 -02:30
Whymarrh Whitby
2ae4720443
Fix words (#9038) 2020-07-20 14:32:49 -02:30
Mark Stacey
7cd609b86b
Fix crash upon removing contact (#9031)
The UI would crash upon deleting a contact from the contact list. This
happened for two reasons: the deletion could result in a re-render
before the `history.push` finished navigating back to the contact list
(it was a race condition), and the contact entry left behind an invalid
`identities` entry when it was removed.

The first problem was fixed by making the container components for view
and edit contact more tolerant of being passed an `address` that
doesn't correspond to a contact. If they are given an address without a
contact, `null` is passed to the component via the `address` prop. The
component will redirect back to the list when this happens instead
rendering. This is more awkward than I'd like, but it was the most
sensible way of handling this I could think of without making much more
drastic changes to how we're handling routing here.

The second problem was caused by the `setAccountLabel` call, which was
used to ensure the contact entry for any wallet accounts was kept
in-sync with the account label. This was being called even for non-
wallet accounts though, which is where this problem arose. This step is
now skipped for non-wallet accounts.

Fixes #9019
2020-07-20 11:55:47 -03:00
Mark Stacey
ea8fa580be
Hide "delete" button when editing contact of wallet account (#9030)
Wallet accounts can't be deleted from the contact list. This button
never worked, nor should it.
2020-07-17 20:30:25 -03:00
Whymarrh Whitby
983e32274c Fix array-callback-return issues
See [`array-callback-return`](https://eslint.org/docs/rules/array-callback-return) for more information.

This change enables `array-callback-return` and fixes the issues raised by the
rule.
2020-07-17 16:03:33 -02:30
Brad Decker
549eb320e8
Narrow usages of 037DD6 to 'primary-blue' (#9008) 2020-07-17 13:11:04 -05:00
Brad Decker
9bf748eb44
Define Design System Colors (#9007)
Adds design system colors to the css/variables/colors file and deprecates
old colors in the deprecated itcss/variables folder
2020-07-17 11:13:45 -05:00
Mark Stacey
e8b33fb7c8
Restore state snapshot for Sentry errors (#9028)
The state snapshot that was attached to Sentry errors was removed
recently in #8794 because it had become too large. The snapshot has
now been restored and reduced in size.

A utility function has been written to reduce the state object to just
the requested properties. This seemed safer than filtering out state
that is known to be large or to contain identifiable information.
This is not a great solution, as now knowledge about the state shape
resides in this large constant, but it will suffice for now. I am
hopeful that we can decorate our controllers with this metadata in the
future instead, as part of the upcoming background controller refactor.

A separate `getSentryState` global function has been added to get the
reduced state, so that the old `getCleanAppState` function that we used
to use could remain unchanged. It's still useful to get that full state
copy while debugging, and in e2e tests.
2020-07-17 12:09:38 -03:00
Mark Stacey
fd2e02274a
Catch gas estimate errors (#9025)
There were two cases where bad gas estimate data was resulting in
crashes. These two places have been wrapped in a `try ... catch` to
handle the absence of gas estimate data.

The errors are still reported to Sentry so that we can track down the
root cause of this corrupted gas estimate data at some point in the
future. We plan on adding additional context to Sentry soon that should
help with this.

Fixes #8992
2020-07-16 20:29:22 -03:00
Brad Decker
c8e50c6b15
Deprecate itcss (#9005) 2020-07-16 15:14:07 -05:00
Mark Stacey
dbafa49448
Skip render when home page is closing or redirecting (#9012)
The Home page component is responsible for closing the notification
window and triggering redirects in various situations. When this
happens, the home page is briefly rendered before the redirect/close
happens. This is a waste of cycles, and is distracting for users.

We now render nothing if the page is in the process of redirecting or
reloading. None of the redirects handled in this component are for sub-
pages, so we don't need the Home page to render in any of these cases.

We were already doing this for redirects to transaction confirmations,
but now we're taking the same approach for all redirects, and for the
cases where the window is closed.
2020-07-16 15:23:07 -03:00
Mark Stacey
b97cd1dc04
Display pending notifications after connect flow (#9011)
The notification window is now kept open after the connect flow if
there are still pending confirmations. Previously, the notification
window would be closed after the connect flow no matter what, and any
pending confirmations would never be shown to the user.

This was accomplished by redirecting to the home screen after the
connect flow. The logic for deciding whether or not to close the window
is already handled by the home page. This does have the unfortunate
side-effect of briefly rendering the home page before the window
closes, but this is a minor problem that exists already in a number of
other scenarios, and it will be fixed in a subsequent PR.

Fixes #8973
2020-07-16 09:13:29 -03:00
Mark Stacey
7333d821b8
Hide loading indication after personal_sign (#9006)
The loading indication had remained after successfully signing with
`personal_sign`. This mistake was introduced accidentally in #8434.

This is noticeable if you confirm the signature in the popup UI or
fullscreen UI, as they remain open after signing. The notification UI
closes after signing without waiting for this loading indicator to be
removed.
2020-07-15 22:12:56 -03:00
Mark Stacey
acaa648779
Fix ListItem styles (#9002)
The styles for the `ListItem` component were recently broken in #8989
because of a change made by `stylelint`. It incorrectly removed the
`fr` unit because of the `length-zero-no-unit` rule. This was a bug
that has since been fixed in `stylelint`; it should have left the `fr`
unit in this case.
2020-07-15 17:13:33 -03:00
Mark Stacey
f46dda0195
Uncomment and fix all auto-fixable stylelint rules (#8989)
All stylelint rules that can be automatically fixed have been uncommented. The rules are:

* `at-rule-empty-line-before`
* `block-closing-brace-empty-line-before`
* `block-closing-brace-newline-before`
* `block-opening-brace-space-before`
* `color-hex-case`
* `color-hex-length`
* `comment-empty-line-before`
* `declaration-block-semicolon-newline-after`
* `declaration-block-semicolon-space-after`
* `declaration-block-trailing-semicolon`
* `declaration-colon-space-after`
* `declaration-empty-line-before`
* `function-comma-space-after`
* `function-comma-space-before`
* `indentation`
* `length-zero-no-unit`
* `no-eol-whitespace`
* `no-missing-end-of-source-newline`
* `number-leading-zero`
* `number-no-trailing-zeros`
* `rule-empty-line-before`
* `selector-list-comma-newline-after`
* `selector-pseudo-element-colon-notation`
2020-07-15 10:13:40 -03:00
Mark Stacey
a789c23faa
Replace inlined vendored CSS with import (#8986)
The vendored CSS required by `react-tippy` is now imported instead of
inlined. This should result in no functional changes, and it makes it
easier to lint our styles.

This was originally inlined in #3120 when `react-tippy` was first added
to the project. It has not been updated since then, so I don't think
there's any risk this has gotten out-of-sync.
2020-07-14 18:43:32 -03:00
Whymarrh Whitby
4f0a205369
Use eslint@6.8.0 (#8978)
* Use eslint@6.8.0
* yarn lint:fix
2020-07-14 12:50:41 -02:30
Mark Stacey
670ae111f0
Remove unnecessary optional chaining operator (#8892)
`state.activeTab` is always guaranteed to be set to an object before
the UI is initialized. This happens in `app/ui.js`.
2020-07-10 12:46:54 -03:00
Brad Decker
9c54b2d8d5
remove superfulous fonts (#8954) 2020-07-10 10:42:59 -05:00
Mark Stacey
d53c4f824e
Add personal_sign e2e test (#8958)
This tests the `personal_sign` method using the test dapp. This test
reflects part of the `confirm-sig-requests` integration test, which
tests the confirmation of a `personal_sign` signature request.

A `data-testid` prop was added to the 'Sign' button on the signature
request confirmation page, to make it easier to select the 'Sign'
button reliably.
2020-07-10 11:35:52 -03:00
Brad Decker
3cbcc913e9
update material-ui/core (#8950) 2020-07-09 16:05:44 -05:00
Mark Stacey
b485a9afb3
Add data-testid to the EthOverview balances (#8951)
Both the primary and secondary balance components on `EthOverview` now
have `data-testid` props, so that they can be more easily referenced in
e2e tests.

This required the addition of a `data-testid` prop to the component
`UserPreferencedCurrencyDisplay`, which is passed through to the
underlying `CurrencyDisplay` component.
2020-07-09 17:33:37 -03:00
Erik Marks
652db3fd36
Use string network and chain IDs (#8628)
* convert network id enums to string

* stringify appropriate chain/network ids in tests

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-07-08 14:05:09 -07:00
Brad Decker
cd4903f65e
remove ramda (#8932) 2020-07-08 15:17:53 -05:00
Dan J Miller
ac525572eb
Move checkExistingAddresses to helpers/utils/util and stop its use of ramda (#8868) 2020-07-07 19:18:18 -03:00
Thomas Huang
15d713f0ee
Standardize transaction activity conversion's currency to 'ETH' (#8934) 2020-07-07 15:15:42 -07:00
Erik Marks
8bc02d4b5e
rpc-cap@3.0.0 (#8924)
* rpc-cap@3.0.0

* adapt use of rpc-cap for new major version
2020-07-05 12:49:22 -07:00
Erik Marks
e20e42bb17
Rename confusing permissions-connect variable (#8925) 2020-07-05 12:38:02 -07:00