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

Merge pull request #3632 from MetaMask/retry-tx-refractor

Retry tx refractor
This commit is contained in:
kumavis 2018-03-20 12:11:50 -07:00 committed by GitHub
commit 1ab165b6d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 35 additions and 1 deletions

View File

@ -40,6 +40,7 @@ function mapStateToProps (state) {
currentCurrency: state.metamask.currentCurrency,
blockGasLimit: state.metamask.currentBlockGasLimit,
computedBalances: state.metamask.computedBalances,
selectedAddressTxList: state.metamask.selectedAddressTxList,
}
}
@ -48,6 +49,23 @@ function ConfirmTxScreen () {
Component.call(this)
}
ConfirmTxScreen.prototype.componentDidUpdate = function (prevProps) {
const {
unapprovedTxs,
network,
selectedAddressTxList,
} = this.props
const { index: prevIndex, unapprovedTxs: prevUnapprovedTxs } = prevProps
const prevUnconfTxList = txHelper(prevUnapprovedTxs, {}, {}, {}, network)
const prevTxData = prevUnconfTxList[prevIndex] || {}
const prevTx = selectedAddressTxList.find(({ id }) => id === prevTxData.id) || {}
const unconfTxList = txHelper(unapprovedTxs, {}, {}, {}, network)
if (prevTx.status === 'dropped' && unconfTxList.length === 0) {
this.goHome({})
}
}
ConfirmTxScreen.prototype.render = function () {
const props = this.props
const {

View File

@ -242,6 +242,22 @@ section .confirm-screen-account-number,
}
}
@media screen and (max-width: 379px) {
.confirm-screen-row {
span.confirm-screen-section-column {
flex: 0.4;
}
div.confirm-screen-section-column {
flex: 0.6;
}
.currency-display__input {
font-size: 14px;
}
}
}
.confirm-screen-row-detail {
font-size: 12px;
line-height: 16px;

View File

@ -170,6 +170,7 @@
@media screen and (max-width: 379px) {
margin-left: 0px;
text-align: center;
}
}
@ -244,7 +245,6 @@
}
.tx-list-item {
height: 80px;
border-top: 1px solid rgb(231, 231, 231);
flex: 0 0 auto;
display: flex;