1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00
Commit Graph

11628 Commits

Author SHA1 Message Date
Erik Marks
79f0ba9697
Fix eth-method-registry import (#10183) 2021-01-12 20:29:47 -08:00
Mark Stacey
9e03066157
Fix UI crash when domain metadata is missing (#10180)
The "Confirm public encryption key" page will now no longer crash when
the domain metadata is missing.
2021-01-12 22:22:58 -03:30
Erik Marks
0dfdd44ae7
Restore support for @metamask/inpage provider@"< 8.0.0" (#10179)
This restores support for versions of the inpage provider prior to v8.
This is intended to support dapps and extensions that directly
instantiated their own provider rather than using the injected
provider.

* Forward traffic between old and new provider streams

* Ignore publicConfig stream for non-legacy muxes

* Transform accountsChanged notification for legacy streams

* Convert publicConfigStore to singleton

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2021-01-12 17:43:45 -08:00
Erik Marks
849a47afba
@metamask/inpage-provider@8.0.2 (#10178) 2021-01-12 14:22:22 -08:00
Mark Stacey
1ee5dc0ef7
Merge pull request #10176 from MetaMask/sync-master
Sync `master` with `develop`
2021-01-12 10:23:50 -03:30
Erik Marks
ed0158a36d Merge branch 'develop' into sync-master 2021-01-12 00:09:11 -08:00
Erik Marks
93068e2c2a
Merge pull request #10054 from MetaMask/Version-v9.0.0 2021-01-11 23:58:18 -08:00
Erik Marks
d7c648db98
eth-method-registry@2.0.0 (#10169) 2021-01-11 08:27:51 -08:00
Mark Stacey
376e846797
Update v9.0.0 changelog (#10172) 2021-01-11 11:38:22 -03:30
Erik Marks
384e812404 Update changelog 2021-01-11 11:12:19 -03:30
Erik Marks
0f3cbb3c93 Add v9.0.0 changelog entry (#10060)
* Add 9.0.0 changelog

* Add #10040 entry to v8.1.9

* Run `prettier` on changelog to get rid of editor syntax warnings
2021-01-11 11:12:19 -03:30
MetaMask Bot
6369f88571 Version v9.0.0 2021-01-11 11:12:19 -03:30
Dan J Miller
2431a5821c
Migration 51: ensure chainId is set in state for default/infura providers (#10170)
* Migration 51: ensure chainId is set in network controller provider state for all infura/default networks

* Clean up

* Migrate incorrect as well as falsy chainIds

Co-authored-by: Erik Marks <rekmarks@protonmail.com>
2021-01-11 11:09:15 -03:30
Wanshan
bcdd2ec91e
Update zh_CN translation (#9772)
* Update zh_CN translation

* Translate 'Gas Limit' to 'Gas 上限'

Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com>
2021-01-08 10:19:41 -08:00
Mark Stacey
69e883c728
Detect tokens on custom Mainnet RPC endpoints (#10157)
Our automatic token detection was hard-coded to only work on our built-
in Infura Mainnet endpoint. It now works with custom Mainnet RPC
endpoints as well.

Relates to #6992
2021-01-08 10:55:46 -03:30
Erik Marks
bc6663d849
Fix block explorer translations (#10160) 2021-01-07 13:13:00 -08:00
Erik Marks
de2dcf1df7
Merge pull request #10159 from MetaMask/sync-master
Sync `master` with `develop`
2021-01-07 12:01:39 -08:00
Mark Stacey
672a387779 Merge remote-tracking branch 'origin/develop' into sync-master
* origin/develop: (66 commits)
  Disable swaps based on chainId, instead of network id (#10155)
  improve handling of last selected provider (#10093)
  Add links to Community Forum to README (#10152)
  @metamask/contract-metadata@1.21.0 (#10142)
  Prevent malformed next nonce warning (#10143)
  add module resolution for node-analytics/axios (#10139)
  Ensure that gas for swap tx submitted at same time as approval is in hex (#10135)
  Fix useTransactionDisplayData unit tests (#10134)
  Fix network settings Kovan block explorer link (#10117)
  Use destructured signal (#10115)
  throw a new wrapped error instead of default one from segment (#10118)
  @metamask/contract-metadata@1.20.0 (#10116)
  Use late-bound noop function when disabling console (#10110)
  Bump @metamask/contract-metadata from 1.19.0 to 1.20.0 (#10104)
  Remove unnecessary swaps footer space when in dropdown mode (#10100)
  Tighten up loading indication logic (#10103)
  Skip reporting of successive persistence failures (#10099)
  Update `@metamask/controllers` to v5.1.0 (#10096)
  @metamask/obs-store@5.0.0 (#10092)
  set last provider when switching to a customRPC (#10084)
  ...
2021-01-07 15:57:40 -03:30
Erik Marks
02f3916280
Merge pull request #10158 from MetaMask/Version-v8.1.11
Version v8.1.11 RC
2021-01-07 11:26:44 -08:00
Dan Miller
d8568325ed Update changelog for v8.1.11 2021-01-07 14:25:51 -03:30
Dan Miller
a30d39f3f3 Version v8.1.11 2021-01-07 14:25:34 -03:30
Dan J Miller
3539885ec2 Disable swaps based on chainId, instead of network id (#10155) 2021-01-07 14:15:47 -03:30
Brad Decker
10afdcce3f add module resolution for node-analytics/axios (#10139) 2021-01-07 14:05:21 -03:30
Dan J Miller
9a1e83cf4b
Disable swaps based on chainId, instead of network id (#10155) 2021-01-07 13:29:32 -03:30
Brad Decker
b5fc1f9314
improve handling of last selected provider (#10093) 2021-01-06 17:31:11 -06:00
Mark Stacey
76c4ebac26
Add links to Community Forum to README (#10152)
The Community Forum is now linked in the README. The sections for
general questions, feature requests, and developer questions are
directly linked as well, to help users discover that we want those type
of inquiries in the forum from now on instead of on GitHub.

Closes #3484
2021-01-06 19:01:15 -03:30
Erik Marks
6abb32f042
@metamask/contract-metadata@1.21.0 (#10142) 2021-01-05 11:08:23 -08:00
Mark Stacey
6f18989582
Prevent malformed next nonce warning (#10143)
The "Next nonce" warning warns users when the custom nonce they set is
higher than our suggested nonce. This warning was mistakenly being
shown even when we didn't have a suggested nonce yet.

Fixes #9989
2021-01-05 14:16:30 -03:30
Brad Decker
7a65b33788
add module resolution for node-analytics/axios (#10139) 2021-01-04 17:44:16 -06:00
Mark Stacey
47fd9bf45d
Merge pull request #10136 from MetaMask/sync-master
Sync `master` with `develop`
2021-01-04 17:35:24 -03:30
Mark Stacey
7606353100 Merge remote-tracking branch 'origin/develop' into sync-master
* origin/develop: (60 commits)
  Ensure that gas for swap tx submitted at same time as approval is in hex (#10135)
  Fix useTransactionDisplayData unit tests (#10134)
  Fix network settings Kovan block explorer link (#10117)
  Use destructured signal (#10115)
  throw a new wrapped error instead of default one from segment (#10118)
  @metamask/contract-metadata@1.20.0 (#10116)
  Use late-bound noop function when disabling console (#10110)
  Bump @metamask/contract-metadata from 1.19.0 to 1.20.0 (#10104)
  Remove unnecessary swaps footer space when in dropdown mode (#10100)
  Tighten up loading indication logic (#10103)
  Skip reporting of successive persistence failures (#10099)
  Update `@metamask/controllers` to v5.1.0 (#10096)
  @metamask/obs-store@5.0.0 (#10092)
  set last provider when switching to a customRPC (#10084)
  Fetch swap quote refresh time from API (#10069)
  Fix `fetch-with-cache` handling of interwoven requests (#10079)
  Fix 9874 - Improve gas maximum estimation  (#10043)
  Add eth_getProof to safe methods (#10070)
  fix metametrics option tracking (#10071)
  Disable console in contentscript (#10040)
  ...
2021-01-04 15:26:46 -03:30
Mark Stacey
13a85db844
Fix useTransactionDisplayData unit tests (#10134) (#10137)
New year, new problems.

It's working as expected, but we had hard-coded some 2020 date values, and `formatDateWithYearContext` adds the year to its output formatted date if the date is not from the current year.

Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com>
2021-01-04 10:50:40 -08:00
Mark Stacey
e7a839d224
Merge pull request #10107 from MetaMask/Version-v8.1.10
Version v8.1.10 RC
2021-01-04 14:48:02 -03:30
Dan J Miller
2957906101
Ensure that gas for swap tx submitted at same time as approval is in hex (#10135) 2021-01-04 14:43:44 -03:30
Erik Marks
d55f579447
Fix useTransactionDisplayData unit tests (#10134)
New year, new problems.

It's working as expected, but we had hard-coded some 2020 date values, and `formatDateWithYearContext` adds the year to its output formatted date if the date is not from the current year.
2021-01-04 09:45:54 -08:00
ivigamberdiev
869124c4c9
Fix network settings Kovan block explorer link (#10117) 2020-12-25 10:51:47 -08:00
Mark Stacey
a50d1c4d0c Update changelog for v8.1.10 (#10112)
Only one commit was omitted, as wasn't a user-facing change (it was the
one that reduced Sentry error volume for out-of-disk-space errors).
2020-12-23 14:04:30 -03:30
MetaMask Bot
a8d1cdb7ee Version v8.1.10 2020-12-23 14:04:00 -03:30
Brad Decker
1aa6d7bfea throw a new wrapped error instead of default one from segment (#10118) 2020-12-23 14:04:00 -03:30
Mark Stacey
a492a5b0d1 Use late-bound noop function when disabling console (#10110)
The `disable-console` script introduced in #10040 used an arrow-
function no-op function to replace `console.log` and `console.info`.
This replacement function was early-bound to the `this` context of the
`disable-console` script, because that's how arrow functions work.

This violates an assumption baked into Sentry, which also replaces the
`console` functions. It wraps them in a function it uses to track
console logs as breadcrumbs. This wrapper function blows up for some
reason if the "original" `console` function is early-bound to a `this`
value of `undefined`.

This resulted in various UI freezes. One example is during onboarding,
when using Firefox with Enhanced Tracking Protection set in "strict"
mode. After submitting a password in the 'Create wallet' flow, the
Sentry `console` wrapper would throw and leave the user stuck on the
loading screen.

By replacing the no-op arrow function with a no-op function
declaration, the problem has been resolved.

Relates to #10097
2020-12-23 14:04:00 -03:30
dependabot[bot]
d9e1b6ee5d Bump @metamask/contract-metadata from 1.19.0 to 1.20.0 (#10104)
Bumps [@metamask/contract-metadata](https://github.com/MetaMask/contract-metadata) from 1.19.0 to 1.20.0.
- [Release notes](https://github.com/MetaMask/contract-metadata/releases)
- [Commits](https://github.com/MetaMask/contract-metadata/compare/v1.19.0...v1.20.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-23 14:04:00 -03:30
David Walsh
c42087d044
Use destructured signal (#10115) 2020-12-23 10:15:07 -06:00
Brad Decker
64adcae08d
throw a new wrapped error instead of default one from segment (#10118) 2020-12-23 00:24:49 -03:30
Erik Marks
2f6f8966bb
@metamask/contract-metadata@1.20.0 (#10116) 2020-12-21 12:07:32 -08:00
Mark Stacey
889ca62723
Use late-bound noop function when disabling console (#10110)
The `disable-console` script introduced in #10040 used an arrow-
function no-op function to replace `console.log` and `console.info`.
This replacement function was early-bound to the `this` context of the
`disable-console` script, because that's how arrow functions work.

This violates an assumption baked into Sentry, which also replaces the
`console` functions. It wraps them in a function it uses to track
console logs as breadcrumbs. This wrapper function blows up for some
reason if the "original" `console` function is early-bound to a `this`
value of `undefined`.

This resulted in various UI freezes. One example is during onboarding,
when using Firefox with Enhanced Tracking Protection set in "strict"
mode. After submitting a password in the 'Create wallet' flow, the
Sentry `console` wrapper would throw and leave the user stuck on the
loading screen.

By replacing the no-op arrow function with a no-op function
declaration, the problem has been resolved.

Relates to #10097
2020-12-19 16:58:49 -03:30
Erik Marks
11d176fde6 Tighten up loading indication logic (#10103)
Ensures that `hideLoadingIndication` is always called in all actions that call `showLoadingIndication`. It's unclear how many of these actions were failing to hide the loading indication, because other actions superset `hideLoadingIndication`. 

At the very least, `updateTransaction` was probably failing to hide the loading indication in the error case.

This PR also refactors a lot of actions to call `hideLoadingIndication` once in `finally` blocks as opposed to multiple times across `try` and `catch` blocks. We avoided making changes to functions using `Promise` methods, because `Promise.finally` is not supported by Waterfox, and it's not properly transpiled by Babel.
2020-12-18 17:37:07 -03:30
Mark Stacey
8dd8bfd690 Skip reporting of successive persistence failures (#10099)
Failure to persist state will now only report to Sentry if the last
attempt to save state succeeded. This ensures that if anyone is stuck
in a state where state can't be saved (e.g. low disk space), we aren't
flooded with repeated errors on Sentry.
2020-12-18 17:36:58 -03:30
Mark Stacey
26c8cd49e0 Update @metamask/controllers to v5.1.0 (#10096)
This update comes with a breaking change to the Approval controller. It
now requires a `defaultApprovalType` parameter.

I don't think we have any use for a default approval type, but I've
added a "NO_TYPE" one for now because it's a strict requirement. We
should consider making this parameter optional in the future, for cases
like this where it's not needed.

This update will hopefully address some caching issues we've been
seeing with our phishing configuration. See here for more details:
https://github.com/MetaMask/controllers/pull/297
2020-12-18 17:36:31 -03:30
Brad Decker
9946819ad9 set last provider when switching to a customRPC (#10084) 2020-12-18 17:35:07 -03:30
dependabot[bot]
5681634ba2
Bump @metamask/contract-metadata from 1.19.0 to 1.20.0 (#10104)
Bumps [@metamask/contract-metadata](https://github.com/MetaMask/contract-metadata) from 1.19.0 to 1.20.0.
- [Release notes](https://github.com/MetaMask/contract-metadata/releases)
- [Commits](https://github.com/MetaMask/contract-metadata/compare/v1.19.0...v1.20.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-18 10:14:48 -06:00