1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Merge pull request #9240 from MetaMask/Version-v8.0.8

Version v8.0.8 RC
This commit is contained in:
Mark Stacey 2020-08-14 20:30:22 -03:00 committed by GitHub
commit eab1add857
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 38 additions and 17 deletions

View File

@ -2,6 +2,11 @@
## Current Develop Branch
## 8.0.8 Fri Aug 14 2020
- [#9211](https://github.com/MetaMask/metamask-extension/pull/9211): Fix Etherscan redirect on notification click
- [#9237](https://github.com/MetaMask/metamask-extension/pull/9237): Reduce volume of web3 usage metrics
- [#9227](https://github.com/MetaMask/metamask-extension/pull/9227): Permit all-caps addresses
## 8.0.7 Fri Aug 07 2020
- [#9065](https://github.com/MetaMask/metamask-extension/pull/9065): Change title of "Reveal Seed Words" page to "Reveal Seed Phrase"
- [#8974](https://github.com/MetaMask/metamask-extension/pull/8974): Add tooltip to copy button for contacts and seed phrase

View File

@ -1,7 +1,7 @@
{
"name": "__MSG_appName__",
"short_name": "__MSG_appName__",
"version": "8.0.7",
"version": "8.0.8",
"manifest_version": 2,
"author": "https://metamask.io",
"description": "__MSG_appDescription__",

View File

@ -1,7 +1,7 @@
import { getBackgroundMetaMetricState } from '../../../ui/app/selectors'
import { sendMetaMetricsEvent } from '../../../ui/app/helpers/utils/metametrics.util'
export default function backgroundMetaMetricsEvent (metaMaskState, eventData) {
export default function backgroundMetaMetricsEvent (metaMaskState, version, eventData) {
eventData.eventOpts['category'] = 'Background'
@ -10,6 +10,7 @@ export default function backgroundMetaMetricsEvent (metaMaskState, eventData) {
sendMetaMetricsEvent({
...stateEventData,
...eventData,
version,
currentPath: '/background',
})
}

View File

@ -1,3 +1,6 @@
const recordedWeb3Usage = {}
/**
* Returns a middleware that implements the following RPC methods:
* - metamask_logInjectedWeb3Usage
@ -15,11 +18,17 @@ export default function createMethodMiddleware ({ origin, sendMetrics }) {
const { action, name } = req.params[0]
sendMetrics({
action,
name,
customVariables: { origin },
})
if (!recordedWeb3Usage[origin]) {
recordedWeb3Usage[origin] = {}
}
if (!recordedWeb3Usage[origin][name]) {
recordedWeb3Usage[origin][name] = true
sendMetrics({
action,
name,
customVariables: { origin },
})
}
res.result = true
break

View File

@ -1842,13 +1842,18 @@ export default class MetamaskController extends EventEmitter {
}
const metamaskState = await this.getState()
backgroundMetaMetricsEvent(metamaskState, {
customVariables,
eventOpts: {
action,
name,
const version = this.platform.getVersion()
backgroundMetaMetricsEvent(
metamaskState,
version,
{
customVariables,
eventOpts: {
action,
name,
},
},
})
)
}
//=============================================================================

View File

@ -223,7 +223,7 @@ export default class ExtensionPlatform {
}
_viewOnEtherscan (txId) {
if (txId.startsWith('http://')) {
if (txId.startsWith('https://')) {
extension.tabs.create({ url: txId })
}
}

View File

@ -115,6 +115,7 @@ function composeParamAddition (paramValue, paramName) {
* @property {string} config.accountType The account type being used at the time of the event: 'hardware', 'imported' or 'default'
* @property {number} config.numberOfTokens The number of tokens that the user has added at the time of the event
* @property {number} config.numberOfAccounts The number of accounts the user has added at the time of the event
* @property {string} config.version The current version of the MetaMask extension
* @property {string} config.previousPath The pathname of the URL the user was on prior to the URL they are on at the time of the event
* @property {string} config.currentPath The pathname of the URL the user is on at the time of the event
* @property {string} config.metaMetricsId A random id assigned to a user at the time of opting in to metametrics. A hexadecimal number

View File

@ -62,11 +62,11 @@ export function addressSummary (address, firstSegLength = 10, lastSegLength = 4,
}
export function isValidAddress (address) {
const prefixed = ethUtil.addHexPrefix(address)
if (address === '0x0000000000000000000000000000000000000000') {
if (!address || address === '0x0000000000000000000000000000000000000000') {
return false
}
return (isAllOneCase(prefixed) && ethUtil.isValidAddress(prefixed)) || ethUtil.isValidChecksumAddress(prefixed)
const prefixed = address.startsWith('0X') ? address : ethUtil.addHexPrefix(address)
return (isAllOneCase(prefixed.slice(2)) && ethUtil.isValidAddress(prefixed)) || ethUtil.isValidChecksumAddress(prefixed)
}
export function isValidDomainName (address) {