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

Merge pull request #6523 from MetaMask/develop

Update master with 6.4.1 Release
This commit is contained in:
Thomas Huang 2019-04-26 11:02:17 -07:00 committed by GitHub
commit 7dcc707a43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 40 additions and 35 deletions

View File

@ -2,6 +2,10 @@
## Current Develop Branch
## 6.4.1 Fri Apr 26 2019
- [#6521](https://github.com/MetaMask/metamask-extension/pull/6521): Revert "Adds 4byte registry fallback to getMethodData()" to fix stalling bug.
## 6.4.0 Wed Apr 17 2019
- [#6445](https://github.com/MetaMask/metamask-extension/pull/6445): * Move send to pages/

View File

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

5
docs/design-system.md Normal file
View File

@ -0,0 +1,5 @@
# MetaMask Design System
A design system is a series of components that can be reused in different combinations. Design systems allow you to manage design at scale.
Design System [Figma File](https://www.figma.com/file/aWgwMrzdAuv9VuPdtst64uuw/Style-Guide?node-id=211%3A0)

View File

@ -48,7 +48,6 @@
&__contents {
display: flex;
justify-content: space-between;
flex-flow: row nowrap;
width: 100%;
@ -74,17 +73,33 @@
flex-direction: row;
align-items: center;
cursor: pointer;
flex: 0 0 auto;
}
&__account-menu-container {
display: flex;
flex-flow: row nowrap;
align-items: center;
flex: 1 1 auto;
width: 0;
flex-flow: row nowrap;
justify-content: flex-end;
}
&__network-component-wrapper {
display: flex;
flex-direction: row;
align-items: center;
flex: 1 0 auto;
width: 0;
justify-content: flex-end;
.network-component.pointer {
max-width: 200px;
}
.network-indicator {
width: 100%;
}
}
}

View File

@ -41,9 +41,6 @@ Network.prototype.render = function () {
} else if (providerName === 'ropsten') {
hoverText = context.t('ropsten')
iconName = 'ropsten-test-network'
} else if (parseInt(networkNumber) === 3) {
hoverText = context.t('ropsten')
iconName = 'ropsten-test-network'
} else if (providerName === 'kovan') {
hoverText = context.t('kovan')
iconName = 'kovan-test-network'
@ -63,7 +60,7 @@ Network.prototype.render = function () {
className: classnames({
'network-component--disabled': this.props.disabled,
'ethereum-network': providerName === 'mainnet',
'ropsten-test-network': providerName === 'ropsten' || parseInt(networkNumber) === 3,
'ropsten-test-network': providerName === 'ropsten',
'kovan-test-network': providerName === 'kovan',
'rinkeby-test-network': providerName === 'rinkeby',
'goerli-test-network': providerName === 'goerli',

View File

@ -70,6 +70,7 @@ $hover-orange: #FFD3B5;
.btn-secondary {
color: $Blue-500;
border: 2px solid $hover-secondary;
background-color: $white;
&:hover {
border-color: $Blue-500;
@ -90,6 +91,7 @@ $hover-orange: #FFD3B5;
.btn-warning {
color: $Orange-500;
border: 2px solid $hover-orange;
background-color: $white;
&:hover {
border-color: $Orange-500;
@ -110,6 +112,7 @@ $hover-orange: #FFD3B5;
.btn-danger {
color: $Red-500;
border: 2px solid $hover-red;
background-color: $white;
&:hover {
border-color: $Red-500;

View File

@ -51,11 +51,13 @@
line-height: 15px;
font-size: 12px;
padding: 0 4px;
flex: 0 0 auto;
}
.fa-question-circle {
margin: 0 4px 0 6px;
font-size: 1rem;
flex: 0 0 auto;
}
}
@ -63,9 +65,12 @@
padding: 0 4px;
font-family: Roboto;
font-size: 12px;
flex: 1 0 auto;
flex: 1 1 auto;
color: $tundora;
font-weight: 500;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.dropdown-menu-item .fa.delete {

View File

@ -30,21 +30,6 @@ export function getTokenData (data = '') {
return abiDecoder.decodeMethod(data)
}
async function getMethodFrom4Byte (fourBytePrefix) {
const fourByteResponse = (await fetch(`https://www.4byte.directory/api/v1/signatures/?hex_signature=${fourBytePrefix}`, {
referrerPolicy: 'no-referrer-when-downgrade',
body: null,
method: 'GET',
mode: 'cors',
})).json()
if (fourByteResponse.count === 1) {
return fourByteResponse.results[0].text_signature
} else {
return null
}
}
const registry = new MethodRegistry({ provider: global.ethereumProvider })
/**
@ -58,16 +43,7 @@ const registry = new MethodRegistry({ provider: global.ethereumProvider })
const fourBytePrefix = prefixedData.slice(0, 10)
try {
const fourByteSig = getMethodFrom4Byte(fourBytePrefix).catch((e) => {
log.error(e)
return null
})
let sig = await registry.lookup(fourBytePrefix)
if (!sig) {
sig = await fourByteSig
}
const sig = await registry.lookup(fourBytePrefix)
if (!sig) {
return {}
@ -81,8 +57,8 @@ const registry = new MethodRegistry({ provider: global.ethereumProvider })
}
} catch (error) {
log.error(error)
const tokenData = getTokenData(data)
const { name } = tokenData || {}
const contractData = getTokenData(data)
const { name } = contractData || {}
return { name }
}

View File

@ -543,7 +543,7 @@ export default class ConfirmTransactionBase extends Component {
toName={toName}
toAddress={toAddress}
showEdit={onEdit && !isTxReprice}
action={actionKey && this.context.t(actionKey) || getMethodName(name) || this.context.t('contractInteraction')}
action={this.context.t(actionKey) || getMethodName(name) || this.context.t('contractInteraction')}
title={title}
titleComponent={this.renderTitleComponent()}
subtitle={subtitle}