Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version v7.2.0 RC #7138

Merged
merged 41 commits into from
Sep 17, 2019
Merged

Version v7.2.0 RC #7138

merged 41 commits into from
Sep 17, 2019

Conversation

metamaskbot
Copy link
Collaborator

📦 🚀

frankiebee and others added 30 commits August 29, 2019 14:57
The token amount displayed when confirming a token transaction was
wrongly being converted to a string in the container. As a result, the
conversion into the user's preferred currency would fail.

A default value of '0' was added for the token amount as well, to
prevent `undefined` from being rendered as the value. Really the value
should never be undefined, but it was rather difficult to handle that
case without a deeper investigation into how it might occur. The 0
default is consistent with existing rendering logic.
In the case where the block gas limit in the MetaMask state is blank,
an exception is sometimes thrown when that blank value is passed to
`multiplyCurrencies` to be parsed as a hex number.

Instead the minimum gas limit is now used instead whenever the block
gas limit is falsy. This was already being done in one case anyway.
* Add missing test descriptions

* Fix async tests that expect a rejection

These tests expected the function under test to return a rejected
promise, and had assertions to be run in the `catch` clause. However,
the tests would still pass if the function didn't reject, with
the assertions never being run.

The tests have been updated to fail if the function doesn't throw.

* Handle ignored promise rejection

In the case where `forceUpdateMetamaskState` rejects, the function
`setSeedPhraseBackedUp` would never resolve. It has been updated to
pass along the rejection instead.

* Return after rejecting promise in action

A few actions would continue after encountering an error, resulting in
errors being compounded. Instead all actions will now return after
encountering an error (which it looks like was the intention in these
cases anyway).
The privacy mode notification was not able to be dismissed from the
popup UI. It should have been dismissed after clicking "Learn more",
but that button opens a new tab first before dismissing the flag.
Opening the new tab kills the pop UI process before it has a chance
to set that flag, so it never gets set.

Re-ordering the handler to set the flag first avoids this problem.
…from-popup

Allow dismissing privacy mode from popup
* Create RTL stylesheets using `gulp-rtl`

* Handle RTL stylesheet special cases

Certain blocks of Sass  were set to bypass "rtlcss" using ignore
comments. Certain icons had to be flipped 180 degrees.

* Switch stylesheets when locale changes

A second stylesheet has been added to each HTML page for use with
right-to-left locales. It is disabled by default. It is enabled on
startup if a RTL locale is set, and when switching to a RTL locale.
Similarly the LTR stylesheet is disabled when a RTL locale is used.

Unfortunately there is an unpleasant flash of unstyled content when
switching between a LTR and a RTL locale. There is also a slightly
longer page load time when using a RTL locale (<1s difference). We
couldn't think of an easy way to avoid these problems.

* Set `dir="auto"` as default on `TextFields`
It was accidentally merged with 4-space indentation.
Co-Authored-By: Dmitriy Ryajov <dryajov@gmail.com>
The `fetch-with-cache` utility was failing to actually cache anything.
It would cache an object with cache time and URL, and would return that
instead of a valid response. This resulted in the error:
`TypeError: fourByteResponse.json is not a function`

The utility was updated to call `.json()` within itself, and cache the
JSON response. The function signature was updated as well, to expect an
options object instead of just the `cacheRefreshTime` option. The
timeout was added to this options object, which helped with testing.

The utility method now also handles unsuccessfull responses, and
incompatible `fetch` options.
There were two competing utility functions for calling fetch with a
timeout. They have been combined into one.
* Add extra locales to index.json

* Fix verify locale script bugs

- All locales didn't work because it was putting an object inside of an object.
- Individual checks didn't work because of how the destructuring was done.
- Extra items were being printed as missing items.

* Sync up string changes w/ Brave wallet

* Add 33 new locales from Brave wallet

* Merge tml into ta code
These were accidentally introduced recently as two separate updates to
the `ru` locale were merged. They added these keys in different places,
so they didn't conflict.
Remove duplicate keys in `ru` locale
* Prevent multiple warnings for the same locale message

Our i18n helper issues warnings whenever a requested message is
missing. These warnings are helpful in assisting translation efforts,
but they can be distracting otherwise. They're especially problematic
for locales that are missing many messages. My browser ended up
crashing on more than one occasion due to the sheer volume of warnings.

The warning has been updated to only be issued once per missing key.
This required updating the method to pass in the current locale. The
current locale was added to the warning itself as well, which could be
helpful for cases where a message is missing in both the current locale
and the fallback ('en').

* Change locale and localeMessages as single action

Updating the current locale and the locale messages resulted in two
renders, and during the first the state was inconsistent (it would say
the locale had changed to the new one, but still be using the old set
of locale messages). Instead the locale is now updated with one atomic
action.

This was required after adding the locale to the missing locale message
warning, as otherwise it would say the message was missing from the
wrong locale.
* Update eth-json-rpc-middleware to @^4.2.0

* Resolve all eth-json-rpc-middleware to 4.2.0
Bumps [nwmatcher](https://github.com/dperini/nwmatcher) from 1.4.3 to 1.4.4.
- [Release notes](https://github.com/dperini/nwmatcher/releases)
- [Commits](https://github.com/dperini/nwmatcher/commits)

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [eslint-utils](https://github.com/mysticatea/eslint-utils) from 1.3.1 to 1.4.2.
- [Release notes](https://github.com/mysticatea/eslint-utils/releases)
- [Commits](mysticatea/eslint-utils@v1.3.1...v1.4.2)

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [lodash-es](https://github.com/lodash/lodash) from 4.17.4 to 4.17.15.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.4...4.17.15)

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [mixin-deep](https://github.com/jonschlinkert/mixin-deep) from 1.3.1 to 1.3.2.
- [Release notes](https://github.com/jonschlinkert/mixin-deep/releases)
- [Commits](jonschlinkert/mixin-deep@1.3.1...1.3.2)

Signed-off-by: dependabot[bot] <support@github.com>
Speeding up anything but the pending transaction with the lowest nonce
is ineffectual, as the transaction with the lowest nonce blocks the
others from completing first. The inline speed-up button in the
transaction activity log has been removed for these invalid cases.

The button will show up in the activity log for the pending transaction
with the lowest nonce, but not for the others.

Closes #6844
* Make chainId available in the metamask-inpage-provider

* Update metamask-inpage-provider to 2.1.0

* Add e2e tests for ethereum.on events

* Move chainId constants to lib/enums.js

* Don't use new chainId enums in createInfuraClient

* Fix app/scripts/lib/select-chain-id.js
@metamaskbot
Copy link
Collaborator Author

Builds ready [c1994cc]: chrome, firefox, edge, opera

kumavis and others added 3 commits September 11, 2019 11:50
Due to a mistake in the release scripts, there were a few changes
accidentally included in the v7.1.1 release. This updates the changelog
to include those changes.
* Publish GitHub release from master branch

This ensures that changes made on `develop` since branching for the
release are not included. It also ensures that the final release
sourcemaps line-up correctly (they were always build on master)`.

* Consolidate publish jobs

The jobs `job-publish-release` and `create_github_release` both handle
different parts of publishing a release. They have been consolidated
into a single `job-publish-release` job.

* Update release script to expect a merge commit

The release script was originally written to be run on `develop`, so it
expected the current commit to be a result of `Squash & Merge`. Now
that it's run on `master`, it will generally be run against a merge
commit.

The version is now extracted from the commit message using a regular
expression that should work on all version of Bash v3+, and should be
tolerant of both merge commits and `Squash & Merge` commits.

* Target `master` with release PR

`master` is now targeted by the release PR instead of `develop`, as
the release has to be created from the master branch.

The update to `develop` is handled after the release by a PR from
`master` to `develop`, which is created automatically after the
release.
@Gudahtt Gudahtt changed the base branch from develop to master September 11, 2019 14:55
* origin/master:
  Allow dismissing privacy mode from popup
  Add changelog
  Version v7.1.1
@metamaskbot
Copy link
Collaborator Author

Builds ready [da1d506]: chrome, firefox, edge, opera

The minimum compatible version of Firefox has been lowered from `60.0`
to `56.2`. It was originally set to `60.0` because that is Firefox ESR,
which currently the minimum Firefox version with security updates.
However Waterfox is based upon Firefox `56.0`, and has backported
security fixes from the ESR release.

This change in minimum version requires no additional transpiling, and
doesn't affect any browser APIs we use.

It does introduce one additional warning in the `addon-linter` about
Firefox for Android `56` lacking support for browser action popups.
However there is no version `56.2` of Firefox for Android, so the
minimum version remains `57` in practice (which does support browser
action popups).
The AbortController is used in both the background and the UI. Support
for AbortController was added to Chrome in version 66, which is above
our minimum supported version.

I did consider increasing the minimum Chrome version to 66, but we have
a decent number of users still on Chrome 65 unfortunately.
* Replace `undefined` selectedAddress with `null`

The `runtime.Port.postMessage` API will drop keys with a value of
`undefined` on Chrome, but not on Firefox. This was a problem for the
`publicConfig` stream, which passed the key `selectedAddress` with the
value of `undefined` to communicate to dapps that the user had logged
out.

Instead a `null` is now passed for `selectedAddress` upon logout, which
is correctly sent by the `runtime.Port.postMessage` API on both Chrome
and Firefox.

closes #7101
closes #7109

* Update `metamask-inpage-provider` to v3.0.0

The v3.0.0 update includes a change to the `accountsChanged` event. The
event will now emit an empty array instead of an array with `undefined`
or `null`.

The previous behavior was to emit `[undefined]`. The previous commit
would have changed that to `[null]` anyway, so we figured if we're
going to make a public-facing change to the event anyway we should
change it to be correct. `[undefined]` was never intended, and it
technically violates EIP-1193, which states that the `accountsChanged`
event should emit an array of strings.
@metamaskbot
Copy link
Collaborator Author

Builds ready [17738aa]: chrome, firefox, edge, opera

@tmashuang
Copy link
Contributor

tmashuang commented Sep 16, 2019

There is a regression with general error messages. Most noticeable when rejecting connecting to dapps will show:

MetaMask - RPC Error: Internal JSON-RPC error. {code: -32603, message: "Internal JSON-RPC error.", data: {…}, stack: "Error: User denied account authorization

Rather than

MetaMask - RPC Error: Error: User denied account authorization
at chrome-extension://lhkniceflnhfabbioipkeeiplfmhmeio/background.js:3214:15 {code: -32603, message: "Error: User denied account authorization↵ at ch…ceflnhfabbioipkeeiplfmhmeio/background.js:3214:15"}

Same for rejecting transactions:

MetaMask - RPC Error: Internal JSON-RPC error. {code: -32603, message: "Internal JSON-RPC error.", data: {…}, stack: "Error: MetaMask Tx Signature: User denied transaction signature."}

Rather than

MetaMask - RPC Error: Error: MetaMask Tx Signature: User denied transaction signature. {code: -32603, message: "Error: MetaMask Tx Signature: User denied transaction signature."}

@rekmarks rekmarks mentioned this pull request Sep 16, 2019
1 task
@metamaskbot
Copy link
Collaborator Author

Builds ready [eb47807]: chrome, firefox, edge, opera

@danfinlay danfinlay merged commit 2783468 into master Sep 17, 2019
@Gudahtt Gudahtt deleted the Version-v7.2.0 branch October 2, 2019 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.