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

Merge branch 'master' into retry-tx-refractor

This commit is contained in:
Dan 2018-03-20 09:27:27 -02:30
commit d9160ac6da
10 changed files with 25 additions and 13 deletions

View File

@ -18,6 +18,7 @@ GasFeeDisplay.prototype.render = function () {
onClick,
primaryCurrency = 'ETH',
convertedCurrency,
gasLoadingError,
} = this.props
return h('div.send-v2__gas-fee-display', [
@ -31,11 +32,13 @@ GasFeeDisplay.prototype.render = function () {
convertedPrefix: '$',
readOnly: true,
})
: h('div.currency-display', t('loading')),
: gasLoadingError
? h('div..currency-display.currency-display--message', 'Set with the gas price customizer.')
: h('div.currency-display', t('loading')),
h('button.sliders-icon-container', {
onClick,
disabled: !gasTotal,
disabled: !gasTotal && !gasLoadingError,
}, [
h('i.fa.fa-sliders.sliders-icon'),
]),

View File

@ -48,6 +48,7 @@ function mapStateToProps (state) {
primaryCurrency,
convertedCurrency: getCurrentCurrency(state),
data,
selectedAddress,
amountConversionRate: selectedToken ? tokenToFiatRate : conversionRate,
tokenContract: getSelectedTokenContract(state),
unapprovedTxs: state.metamask.unapprovedTxs,

View File

@ -87,7 +87,6 @@
flex: 1 0 auto;
display: flex;
flex-flow: column nowrap;
padding-top: 4px;
}
&__check-mark {
@ -115,13 +114,11 @@
color: $white;
font-size: 18px;
font-weight: 300;
line-height: 16px;
}
&__balance {
color: $dusty-gray;
font-size: 14px;
line-height: 19px;
}
&__action {

View File

@ -10,8 +10,9 @@
.network-component.pointer {
border: 2px solid $silver;
border-radius: 82px;
padding: 3px;
padding: 7px 3px;
flex: 0 0 auto;
display: flex;
&.ethereum-network .menu-icon-circle div {
background-color: rgba(3, 135, 137, .7) !important;

View File

@ -265,7 +265,6 @@ $wallet-view-bg: $alabaster;
.account-name {
font-size: 24px;
font-weight: 300;
line-height: 20px;
color: $black;
margin-top: 8px;
margin-bottom: .9rem;

View File

@ -661,6 +661,12 @@
&__gas-fee-display {
width: 100%;
position: relative;
.currency-display--message {
padding: 8px 38px 8px 10px;
display: flex;
align-items: center;
}
}
&__sliders-icon-container {

View File

@ -97,7 +97,7 @@
.tx-list-content-wrapper {
align-items: stretch;
margin-bottom: 4px;
margin: 4px 0;
flex: 1 0 auto;
width: 100%;
display: flex;
@ -183,6 +183,7 @@
align-self: center;
flex: 0 0 auto;
margin-right: 16px;
display: flex;
}
.tx-list-account-and-status-wrapper {
@ -243,6 +244,7 @@
}
.tx-list-item {
height: 80px;
border-top: 1px solid rgb(231, 231, 231);
flex: 0 0 auto;
display: flex;

View File

@ -13,7 +13,6 @@ body {
font-family: Roboto, Arial;
color: #4d4d4d;
font-weight: 300;
line-height: 1.4em;
background: #f7f7f7;
width: 100%;
height: 100%;
@ -103,6 +102,7 @@ input.large-input {
&::after {
content: '\00D7';
font-size: 40px;
line-height: 20px;
}
}

View File

@ -112,10 +112,6 @@ section {
display: block;
}
body {
line-height: 1;
}
ol,
ul {
list-style: none;

View File

@ -42,6 +42,7 @@ function SendTransactionScreen () {
to: null,
amount: null,
},
gasLoadingError: false,
}
this.handleToChange = this.handleToChange.bind(this)
@ -128,6 +129,10 @@ SendTransactionScreen.prototype.updateGas = function () {
.then(([gasPrice, gas]) => {
const newGasTotal = this.getGasTotal(gas, gasPrice)
updateGasTotal(newGasTotal)
this.setState({ gasLoadingError: false })
})
.catch(err => {
this.setState({ gasLoadingError: true })
})
} else {
const newGasTotal = this.getGasTotal(gasLimit, gasPrice)
@ -436,6 +441,7 @@ SendTransactionScreen.prototype.renderGasRow = function () {
showCustomizeGasModal,
gasTotal,
} = this.props
const { gasLoadingError } = this.state
return h('div.send-v2__form-row', [
@ -448,6 +454,7 @@ SendTransactionScreen.prototype.renderGasRow = function () {
conversionRate,
convertedCurrency,
onClick: showCustomizeGasModal,
gasLoadingError,
}),
]),