Merge pull request #9054 from MetaMask/Version-v8.0.6
Version v8.0.6 RCfeature/default_network_editable
commit
b3304ca35e
@ -1,13 +1,13 @@ |
|||||||
.alert-circle-icon { |
.alert-circle-icon { |
||||||
&--danger { |
&--danger { |
||||||
border-color: $danger-red; |
border-color: $accent-red; |
||||||
color: $danger-red; |
color: $accent-red; |
||||||
background: $danger-light-red; |
background: $Red-000; |
||||||
} |
} |
||||||
|
|
||||||
&--warning { |
&--warning { |
||||||
border-color: $warning-yellow; |
border-color: $accent-yellow; |
||||||
color: $warning-yellow; |
color: $accent-yellow; |
||||||
background: $warning-light-yellow; |
background: $Yellow-000; |
||||||
} |
} |
||||||
} |
} |
||||||
|
@ -1,14 +1,25 @@ |
|||||||
|
/* |
||||||
|
MetaMask design system imports |
||||||
|
The variables declared here should take precedence. |
||||||
|
They are included first because they will be used to replace bad variable names in itcss |
||||||
|
prior to it being fully removed from the system. |
||||||
|
*/ |
||||||
|
@import './variables/index'; |
||||||
|
|
||||||
/* |
/* |
||||||
ITCSS |
ITCSS |
||||||
|
|
||||||
http://www.creativebloq.com/web-design/manage-large-css-projects-itcss-101517528 |
http://www.creativebloq.com/web-design/manage-large-css-projects-itcss-101517528 |
||||||
https://www.xfive.co/blog/itcss-scalable-maintainable-css-architecture/ |
https://www.xfive.co/blog/itcss-scalable-maintainable-css-architecture/ |
||||||
*/ |
|
||||||
|
|
||||||
|
DEPRECATED: This CSS architecture is deprecated. The following imports will be removed |
||||||
|
overtime. |
||||||
|
*/ |
||||||
@import './itcss/settings/index'; |
@import './itcss/settings/index'; |
||||||
@import './itcss/tools/index'; |
@import './itcss/tools/index'; |
||||||
@import './itcss/generic/index'; |
@import './itcss/generic/index'; |
||||||
@import './itcss/objects/index'; |
@import './itcss/objects/index'; |
||||||
@import './itcss/components/index'; |
@import './itcss/components/index'; |
||||||
@import './itcss/trumps/index'; |
@import './itcss/trumps/index'; |
||||||
|
// Other imports |
||||||
@import '../../../node_modules/react-select/dist/react-select'; |
@import '../../../node_modules/react-select/dist/react-select'; |
||||||
|
@ -0,0 +1,76 @@ |
|||||||
|
// These are the colors of the MetaMask design system |
||||||
|
// Only design system colors should be added, no superfluous variables |
||||||
|
// See https://bit.ly/32mnoja (link to figma design system) |
||||||
|
$Blue-000: #eaf6ff; |
||||||
|
$Blue-100: #a7d9fe; |
||||||
|
$Blue-200: #75c4fd; |
||||||
|
$Blue-300: #43aefc; |
||||||
|
$Blue-400: #1098fc; |
||||||
|
$Blue-500: #037dd6; |
||||||
|
$Blue-600: #0260a4; |
||||||
|
$Blue-700: #024272; |
||||||
|
$Blue-800: #01253f; |
||||||
|
$Blue-900: #00080d; |
||||||
|
|
||||||
|
$Grey-000: #f2f3f4; |
||||||
|
$Grey-100: #d6d9dc; |
||||||
|
$Grey-200: #bbc0c5; |
||||||
|
$Grey-300: #9fa6ae; |
||||||
|
$Grey-400: #848c96; |
||||||
|
$Grey-500: #6a737d; |
||||||
|
$Grey-600: #535a61; |
||||||
|
$Grey-700: #3b4046; |
||||||
|
$Grey-800: #24272a; |
||||||
|
$Grey-900: #141618; |
||||||
|
|
||||||
|
$Green-000: #f3fcf5; |
||||||
|
$Green-100: #d6ffdf; |
||||||
|
$Green-200: #afecbd; |
||||||
|
$Green-300: #86e29b; |
||||||
|
$Green-400: #5dd879; |
||||||
|
$Green-500: #28a745; |
||||||
|
$Green-600: #1e7e34; |
||||||
|
$Green-700: #145523; |
||||||
|
$Green-800: #0a2c12; |
||||||
|
$Green-900: #041007; |
||||||
|
|
||||||
|
$Red-000: #fcf2f3; |
||||||
|
$Red-100: #f7d5d8; |
||||||
|
$Red-200: #f1b9be; |
||||||
|
$Red-300: #e88f97; |
||||||
|
$Red-400: #e06470; |
||||||
|
$Red-500: #d73a49; |
||||||
|
$Red-600: #b92534; |
||||||
|
$Red-700: #8e1d28; |
||||||
|
$Red-800: #64141c; |
||||||
|
$Red-900: #3a0c10; |
||||||
|
|
||||||
|
$Orange-000: #fef5ef; |
||||||
|
$Orange-100: #fde2cf; |
||||||
|
$Orange-200: #fbc49d; |
||||||
|
$Orange-300: #faa66c; |
||||||
|
$Orange-400: #f8883b; |
||||||
|
$Orange-500: #f66a0a; |
||||||
|
$Orange-600: #c65507; |
||||||
|
$Orange-700: #954005; |
||||||
|
$Orange-800: #632b04; |
||||||
|
$Orange-900: #321602; |
||||||
|
|
||||||
|
$Yellow-000: #fefae8; // Temporary placeholder |
||||||
|
$Yellow-100: #fefcde; |
||||||
|
$Yellow-500: #ffd33d; |
||||||
|
|
||||||
|
$Black-100: #24292e; |
||||||
|
|
||||||
|
$primary-blue: $Blue-500; |
||||||
|
$primary-orange: $Orange-500; |
||||||
|
|
||||||
|
$accent-yellow: $Yellow-500; |
||||||
|
$accent-green: $Green-500; |
||||||
|
$accent-red: $Red-500; |
||||||
|
$accent-purple: #6f42c1; |
||||||
|
$accent-pink: #ff45d8; |
||||||
|
|
||||||
|
$neutral-white: #fff; |
||||||
|
$neutral-black: $Black-100; |
||||||
|
$neutral-grey: $Grey-500; |
@ -0,0 +1 @@ |
|||||||
|
@import './colors.scss'; |
@ -1 +0,0 @@ |
|||||||
export { default } from './with-method-data.component' |
|
@ -1,65 +0,0 @@ |
|||||||
import React, { PureComponent } from 'react' |
|
||||||
import PropTypes from 'prop-types' |
|
||||||
import { getMethodDataAsync, getFourBytePrefix } from '../../utils/transactions.util' |
|
||||||
|
|
||||||
export default function withMethodData (WrappedComponent) { |
|
||||||
return class MethodDataWrappedComponent extends PureComponent { |
|
||||||
static propTypes = { |
|
||||||
transaction: PropTypes.object, |
|
||||||
knownMethodData: PropTypes.object, |
|
||||||
addKnownMethodData: PropTypes.func, |
|
||||||
} |
|
||||||
|
|
||||||
static defaultProps = { |
|
||||||
transaction: {}, |
|
||||||
knownMethodData: {}, |
|
||||||
} |
|
||||||
|
|
||||||
state = { |
|
||||||
methodData: {}, |
|
||||||
done: false, |
|
||||||
error: null, |
|
||||||
} |
|
||||||
|
|
||||||
componentDidMount () { |
|
||||||
this.fetchMethodData() |
|
||||||
} |
|
||||||
|
|
||||||
async fetchMethodData () { |
|
||||||
const { transaction, knownMethodData, addKnownMethodData } = this.props |
|
||||||
const { txParams: { data = '' } = {} } = transaction |
|
||||||
|
|
||||||
if (data) { |
|
||||||
try { |
|
||||||
let methodData |
|
||||||
const fourBytePrefix = getFourBytePrefix(data) |
|
||||||
if (fourBytePrefix in knownMethodData) { |
|
||||||
methodData = knownMethodData[fourBytePrefix] |
|
||||||
} else { |
|
||||||
methodData = await getMethodDataAsync(data) |
|
||||||
if (!Object.entries(methodData).length === 0) { |
|
||||||
addKnownMethodData(fourBytePrefix, methodData) |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
this.setState({ methodData, done: true }) |
|
||||||
} catch (error) { |
|
||||||
this.setState({ done: true, error }) |
|
||||||
} |
|
||||||
} else { |
|
||||||
this.setState({ done: true }) |
|
||||||
} |
|
||||||
} |
|
||||||
|
|
||||||
render () { |
|
||||||
const { methodData, done, error } = this.state |
|
||||||
|
|
||||||
return ( |
|
||||||
<WrappedComponent |
|
||||||
{ ...this.props } |
|
||||||
methodData={{ data: methodData, done, error }} |
|
||||||
/> |
|
||||||
) |
|
||||||
} |
|
||||||
} |
|
||||||
} |
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue