1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-29 07:16:36 +01:00
Commit Graph

10830 Commits

Author SHA1 Message Date
Whymarrh Whitby
8443ee5416 Use bl@3.0.1, dedupe bl@1.x (#9375) 2020-09-16 17:24:08 -02:30
Whymarrh Whitby
7f4c84967a Use bl@1.2.3 (#9349) 2020-09-16 17:24:08 -02:30
Whymarrh Whitby
93b9a01fd6 Version v8.0.10 2020-09-16 17:24:02 -02:30
Mark Stacey
a9202748d1
Merge pull request #9267 from MetaMask/Version-v8.0.9
Version v8.0.9 RC
2020-08-19 17:51:45 -03:00
Mark Stacey
b9f5f1c2c2
Hide ETH Gas Station stimates on non-main network (#9277)
* Hide gas estimate on non-main network (#9189)

* Update v8.0.9 changelog
2020-08-19 17:19:59 -03:00
Mark Stacey
a0fb62c04a
Update changelog for v8.0.9 (#9268)
No commits have been omitted.
2020-08-19 10:46:07 -03:00
Whymarrh Whitby
0ff70ccbda Use @metamask/controllers@2.0.5 (#9266) 2020-08-18 23:10:29 -03:00
Mark Stacey
de354751fd Handle non-String web3 property access (#9256)
The web3 usage metrics added in #9144 assumed that all web3 properties
were strings. When a `Symbol` property is accessed, our `inpage.js`
script crashes because the `Symbol` cannot be serialized correctly.

A check has been added for non-string property access. The metric event
in these cases is set to the string "typeof ", followed by the type of
the key. (e.g. `typeof symbol` for a `Symbol` property).

Fixes #9234
2020-08-18 23:10:06 -03:00
Patryk Łucka
2986a6764c move footer buttons to scrollable area (#9228)
Co-authored-by: Patryk Łucka <patryk.lucka@consensys.net>
2020-08-18 23:09:55 -03:00
MetaMask Bot
5c88d8d250 Version v8.0.9 2020-08-19 02:07:15 +00:00
Mark Stacey
eab1add857
Merge pull request #9240 from MetaMask/Version-v8.0.8
Version v8.0.8 RC
2020-08-14 20:30:22 -03:00
Mark Stacey
e8a468a5ec
Update v8.0.8 changelog (#9241) 2020-08-14 20:05:14 -03:00
MetaMask Bot
5db866bc88 Version v8.0.8 2020-08-14 19:39:41 -03:00
Patryk Łucka
e47774d3e4 Permit all-caps addresses (#9227)
* permit all-caps addresses

* handle empty address
2020-08-14 19:39:41 -03:00
Mark Stacey
d49c44426f Send web3 usage metrics once per origin/property (#9237)
The usage metrics for the injected web3 instance were being sent upon
each use, which exceeded the limits of our Matomo plan. These metrics
are now only being sent upon the first usage, for each origin and
property.
2020-08-14 19:15:40 -03:00
Patryk Łucka
74decc3407 Fix Etherscan redirect on notification click (#9211) 2020-08-14 19:15:03 -03:00
Mark Stacey
4d499cc39e Add version dimension to background metrics (#9167)
The background metrics were missing the `version` custom dimension. It
has now been added to all background metric events.
2020-08-14 19:05:27 -03:00
Mark Stacey
1a5218ce8e
Merge pull request #9160 from MetaMask/Version-v8.0.7
Version v8.0.7 RC
2020-08-10 15:07:25 -03:00
Thomas Huang
747f4bb5c3 Add category in eventOpts (#9164) 2020-08-09 00:43:20 -03:00
Mark Stacey
027723d396
Update changelog for v8.0.7 (#9161)
Changes that were not user-facing have been omitted, and the
descriptions have been updated to be more readable for users.
2020-08-07 17:54:51 -03:00
MetaMask Bot
8063a83d85 Version v8.0.7 2020-08-07 19:45:54 +00:00
Erik Marks
c3bc7de412 Remove web3 e2e tests (#9159) 2020-08-07 16:42:49 -03:00
Erik Marks
500dbf76cf Add web3 usage metrics, prepare for web3 removal (#9144)
* add web3 usage metrics

* move web3 metrics method to new middleware

* rename some methods, files, and exports
2020-08-07 16:42:48 -03:00
Mark Stacey
f39498703e Use pathname instead of URL for currentPath metrics parameter (#9158)
The `currentPath` parameter passed to our metrics utility had been
passed the full URL rather than just the path, contrary to what the
name would imply. We only used the path portion, so passing the full
URL did lead to complications.

Now just the `pathname` is passed in, rather than the full URL. This
simplifies the metrics logic, and it incidentally fixes two bugs.

The main bug fixed is regarding Firefox metrics. Previously we had
assumed the `currentPath` would start with `chrome-extension://`, which
of course was not true on Firefox. This lead to us incorrectly parsing
the `currentPath`, so path tracking was broken for Firefox events.
This broken parsing is now bypassed entirely, so metrics should now
work the same on Firefox as on Chrome.

The second bug was that we were incorrectly setting the tracking URL
for background events during tests. As a result, we were incorrectly
detecting ourselves as an internal site that had referred the user to
us. But this was not of major concern, since it only affected test
metrics (which get sent to the development Matomo project).

Lastly, this change let us discard the `pathname` parameter used in
the `overrides` parameter of the `metricsEvent` function. Now that
`currentPath` is equivalent to `pathname`, the `pathname` parameter is
redundant.
2020-08-07 16:42:48 -03:00
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