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

10806 Commits

Author SHA1 Message Date
Mark Stacey
426ddc8010 Remove url parameter from metricsEvent (#9157)
* Remove `url` parameter from `metricsEvent`

The `url` parameter was used to override the `currentPath`, but it
never worked correctly. It was supposed to be used for setting the
`url` query parameter that was sent to Matomo, but `currentPath` was
always used even if it `url` was set and `currentPath` was empty.

Instead, `currentPath` is now always used. There was never a need to
provide an "override" for `currentPath` when it can be set directly.
The metrics provider does set `currentPath` automatically by default,
but this can be overwritten already by passing a second parameter to
`metricsEvent`.

There were two places this `url` parameter was being used: background
events, and path changes. Background events were submitted with no
`currentPath`, so because of the bug with the `url` parameter, the
metrics utility would crash upon each event. So those were never
actually sent. This commit will fix that crash.

The `currentPath` parameter was supplied as an empty string for the
path change events, so those never crashed. They just had the `url`
query string parameter set incorrectly (to an empty string). It should
now be correctly populated, which should mean we'll be capturing all
path changes now. Previously we were only capturing path changes to
pages that happened to include an event, because of this blank `url`
problem.

* Use `url` query parameter as fallback for generating `pv_id`

The `pv_id` parameter currently isn't generated correctly on Firefox,
as the generation assumes that the current URL starts with
`chrome-extension://`. The `url` query parameter is still unique for
each path, so it's probably good enough for generating an id for each
page.

This is just a temporary fix; it will be removed in a future PR, where
Firefox will be properly supported.
2020-08-07 16:42:48 -03:00
Mark Stacey
dc69e4e9d3 Change MetaMetrics category for background events (#9155)
Background events are now sent in the `Background` category, rather
than `backend`. Conventionally we use the term "background" over
"backend", as it's not really a "backend" in the normal sense since
it's a client background process. Also it's capitalized because all of
the other event categories are capitalized as well.

The metrics URL has been updated to use `background` instead of
`backend` as well, for consistency.

Luckily we don't have to worry about our metrics being disjointed due
to this name change, because the background metrics never worked to
begin with! So there will be none under the old name. The metrics will
be made functional in a separate PR.
2020-08-07 16:42:48 -03:00
Erik Marks
1bcdad5815 remove .network-name height 2020-08-07 16:42:48 -03:00
Whymarrh Whitby
86979f37f8 Use luxon@1.24.1 (#9154) 2020-08-07 16:42:48 -03:00
Thomas Huang
a1682554bf Update 'react-devtools' to ^4.8.0 (#9140)
* bump-react-devtools

* Completed yarn lock after version bump of react-devtools
2020-08-07 16:42:48 -03:00
Erik Marks
c33eecb33b Fix connection removal bug (#9137)
* fix remove connections bug
2020-08-07 16:42:48 -03:00
Mark Stacey
041b5e595a Add source map validator to CI (#9135)
Source maps are now validated during CI. This is done during a new job
called "validate-source-maps`, and it is required to pass for tests to
pass.
2020-08-07 16:42:48 -03:00
Mark Stacey
b490da3931 Update source map validator target files (#9133)
All JavaScript files included in the final bundle are now listed as
target files. The `phishing-detect.js` file is the only new file to be
validated that was not validated before.

Any files that are expected to fail validation are commented out, with
a note explaining why they're expected to fail.
2020-08-07 16:42:48 -03:00
Mark Stacey
e17c18ff7d Improve sourcemap validator console report (#9131)
The report printed to the console for invalid source map samples has
been improved in a few ways:

* The entire message is now printed using `console.error`, so the
contents aren't split between STDERR and STDOUT
* The code fence is now guaranteed to be a set length, rather than it
varying depending on the filename
* The code fence is no longer padded on the inside with newlines, which
results in a more compact output that is (in my opinion) just as
readable.
2020-08-07 16:42:48 -03:00
Mark Stacey
c5ce4a1ccd Add validate-source-maps npm script (#9134)
This script executes the `sourcemap-validator.js` script to validate
the source maps in the `dist` directory.
2020-08-07 16:42:48 -03:00
Mark Stacey
3f59b648c8 Non-zero exit code upon failure to validate source maps (#9132)
The source map validator will now exit with a non-zero exit code when
an error occurs, or when the source maps cannot be validated.
2020-08-07 16:42:48 -03:00
Mark Stacey
6fe3a1179b Update brfs from v1.6.1 to v2.0.2 (#9115)
We were not affected by the breaking changes introduced with v2.0.0.
This was updated primarily to get a bugfix relating to source maps, and
to update some older transitive dependencies.
2020-08-07 16:42:48 -03:00
Mark Stacey
d4c3fa6885 Factor out getEnvironment function in build script (#9114)
There are no functional changes. This was extracted from #8170
2020-08-07 16:42:48 -03:00
Mark Stacey
7ab01c8ffd Update browserify from v16.2.3 to v16.5.1 (#9113)
The changes between these two versions don't seen to affect us a great
deal. The browserify dependency updates do result in changes to our
production bundle, but the changes have no obvious functional impact.
2020-08-07 16:42:48 -03:00
Mark Stacey
99e1ee40a4 Update sesify-viz from v3.0.9 to v3.0.10 (#9111)
The changes between v3.0.9 and v3.0.10 are minimial - just some minor
improvements to error handling.
2020-08-07 16:42:48 -03:00
Mark Stacey
fbd32c8920 Update gulp-rename from v1.4.0 to v2.0.0 (#9112)
The changes between these versions don't affect us. The breaking change
was related to passing in a function to `gulp-rename`, which we don't
do.
2020-08-07 16:42:48 -03:00
Mark Stacey
5296a2a18b Update source-map-explorer from v2.0.1 to v2.4.2 (#9110)
The output remains identical between these two versions, and none of
the changelog entries appear relevant to us (aside from maybe some of
the bug fixes).
2020-08-07 16:42:48 -03:00
Mark Stacey
95c2802bb0 Add build-artifacts to .gitignore (#9109)
The `build-artifacts` directory is created on CI (as of #7151), and is
used to store the sesify visualization and dependency logs. It's useful
to have this ignored locally as well, for when those scripts are being
tested.
2020-08-07 16:42:48 -03:00
Whymarrh Whitby
e435291074 Use async/await for seedPhraseVerifier.verifyAccounts (#9100) 2020-08-07 16:42:48 -03:00
Whymarrh Whitby
a7089193c8 Use async/await for getRestrictedMethods (#9099) 2020-08-07 16:42:48 -03:00
Whymarrh Whitby
2445c0b41b Update dependencies (#9105)
This change updates the following two dependencies to address high severity advisories in the production dependencies:

* Use elliptic@6.5.3
* Use dot-prop@5.2.0

The public advisories:

- `elliptic`: [npm](https://www.npmjs.com/advisories/1547)
- `dot-prop`: [npm](https://www.npmjs.com/advisories/1213), [GHSA-ff7x-qrg7-qggm](https://github.com/advisories/GHSA-ff7x-qrg7-qggm)

I don't believe there to be any functional changes here:

- I don't think we hit any (important?) codepaths of the whole `ipld-zcash/zcash-bitcore-lib/elliptic` subtree of 3Box
- `dot-prop` doesn't have a changelog but;
    - Looking through [`v3.0.0...v4.0.0`](https://github.com/sindresorhus/dot-prop/compare/v3.0.0...v4.0.0) it would seem that the breaking change was requiring Node.js 4 ([`88b6eb6`](88b6eb66cf))
    - The only breaking change listed for [v5.0.0](https://github.com/sindresorhus/dot-prop/releases/tag/v5.0.0) was requiring Node.js 8.
2020-08-07 16:42:48 -03:00
Brad Decker
10a12b8033 update email us to contact us (#9104) 2020-08-07 16:42:48 -03:00
Mark Stacey
5b39ce2822 Improve source maps (#9101)
Our source maps were being corrupted during minification, because the
`gulp-terser-js` plugin we were using didn't account for the existence
of sourcemaps in the input. A configuration option to allow the input
of sourcemaps was added in v5.2.0. The plugin has been updated, and we
now use this option.

Previously the generated sourcemaps had an invalid entry in the
"sources" array, with the filename of the bundle itself. This was not a
real source. After this change, this invalid source is no longer
present.
2020-08-07 16:42:48 -03:00
Erik Marks
0da5039541 rpc-cap@3.1.0 (#9103) 2020-08-07 16:42:47 -03:00
Mark Stacey
0b71e1a619 Use environment variable for production Sentry DSN (#9097)
The Sentry DSN is now expected to be provided via environment variable
for production builds. The build script will fail if it is missing, and
an error will be thrown at runtime if it is missing.

The `SENTRY_DSN` environment variable has been set in CI to the old
value for `SENTRY_PROD_DSN`. We can migrate to a new DSN at some point
in the future.
2020-08-07 16:42:47 -03:00
Mark Stacey
4ac6e82cb6 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-08-07 16:42:47 -03:00
Mark Stacey
0fb931950c Disable Sentry in development (#9095)
In a non-production environment, Sentry was configured to send error
reports to a "test" MetaMask project. It will still do this during e2e
tests, but in development Sentry is now disabled completely.

In practice this was never useful in development.
2020-08-07 16:42:47 -03:00
Mark Stacey
472b510597 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-08-07 16:42:47 -03:00
Mark Stacey
f7c7007d83 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-08-07 16:42:47 -03:00
Erik Marks
2880fe6a07 json-rpc-engine@5.2.0 (#9091) 2020-08-07 16:42:47 -03:00
Erik Marks
948a4c8316 fixup! call initializeProvider where necessary 2020-08-07 16:42:47 -03:00
Erik Marks
30a59bb867 call initializeProvider where necessary 2020-08-07 16:42:47 -03:00
Erik Marks
93f695d3c6 fix timing-reliant network controller test 2020-08-07 16:42:47 -03:00
Erik Marks
1591ed7657 Robustify permissions controller requestUserApproval tests (#9064)
* convert requestUserApproval mock to wrapper
2020-08-07 16:42:47 -03:00
ryanml
1819606f93 Complete onboarding upon importing/verifying seed (#8873)
Fixes #8679
2020-08-07 16:42:47 -03:00
Brad Decker
7cf930f5f8 support longer text in network dropdown (#9085) 2020-08-07 16:42:47 -03:00
Thomas Huang
f9e4023b04 Fix popup/notification when browser is in fullscreen, primarily on macOS. (#9075)
* Fix popup/notification when browser is in fullscreen, primarily on OSX.

The issue was reported internally via Slack. User was running Mac OSX Chrome in fullscreen mode where Chrome is created in a new Desktop workspace.

The issue reproduced on OSX Chrome in fullscreen/maximized view overrides the explicitly set width and height for `windows.create()`. Possibly not overrides, but creates a window based off of the window that it was created from. Found a related [Chromium bug](https://bugs.chromium.org/p/chromium/issues/detail?id=263092&q=window%20create%20width%20os%3DMac&can=2).
The fullscreen `popup.left` pixel will calculate the window position incorrectly since we set and assume the width of the created window. The incorrect `left` position the window and transition the focus Desktop/Workspace incorrectly and make is seem to lose focus of the new window/workspace. Incidentally this will make the popup full width/height, and create a new workspace for the view, which we have no control over until Chrome
fixes it.

This will check if the popup is 'fullscreen', which it gets passed from the origin window, if so then don't reposition the window. If Chrome fixes the issue we can revert this change.

* Feedback commit

Co-authored-by: Mark Stacey <markjstacey@gmail.com>

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-08-07 16:42:47 -03:00
ryanml
230d43176d Fixes MetaMask/metamask-extension#8626 - verifies password on requesting seed phrase (#9063) 2020-08-07 16:42:47 -03:00
Bakhtiiar Muzakparov
1747f91bf1
Add tooltip to contacts (#8974)
Fixes #8790
2020-07-24 11:17:03 -03:00
Whymarrh Whitby
b378e57b27
Drop unused reviewers from CI scripts (#9068) 2020-07-23 21:15:09 -02:30
Whymarrh Whitby
b7a4d35318
Retry e2e tests 3 times (#9070) 2020-07-23 20:01:42 -02:30
Whymarrh Whitby
93978f139e
Fix typo (#9069) 2020-07-23 18:01:13 -02:30
Whymarrh Whitby
1c8a4e36ad
Update revealSeedWords to use "phrase" (#9065) 2020-07-23 16:22:47 -02:30
Mark Stacey
5536ca2f51
Merge pull request #9067 from MetaMask/master
Sync `master` with `develop`
2020-07-23 15:50:31 -03:00
Mark Stacey
b3304ca35e
Merge pull request #9054 from MetaMask/Version-v8.0.6
Version v8.0.6 RC
2020-07-23 15:20:47 -03:00
Mark Stacey
8098b3573b
Update changelog for v8.0.6 (#9062)
The update of `content-hash` was included because I wasn't entirely
sure whether or not that involved a functional change, or what that
change might be. I also neglected to expand upon the changes made in
the `inpage-provider` update, as I couldn't think of a concise way to
describe them.
2020-07-23 13:14:26 -03:00
MetaMask Bot
e033a1c280 Version v8.0.6 2020-07-22 20:47:51 -03:00
Brad Decker
21292a8ed1
update eth-token-tracker (#9056) 2020-07-22 15:31:22 -05:00
Whymarrh Whitby
231867df39
Handle failure to build webDriver instance (#9052) 2020-07-22 15:55:04 -02:30
Thomas Huang
17e9d85401
Resolve on 0x (#9048) 2020-07-22 11:05:23 -07:00