Skip to content

Commit

Permalink
Merge pull request #93 from poanetwork/empty-screen
Browse files Browse the repository at this point in the history
(Fix) Empty pending tx screen after logout/login
  • Loading branch information
vbaranov authored Aug 27, 2018
2 parents 2007639 + b25d3a2 commit 97f01e7
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 26 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

## Current Master

- [#93](https://github.com/poanetwork/metamask-extension/pull/93): (Fix) Empty pending tx screen after logout/login
- [#91](https://github.com/poanetwork/metamask-extension/pull/91): (Fix) Confirm tx notification popup: network name
- [#89](https://github.com/poanetwork/metamask-extension/pull/89): (Feature) Support of token per network basis
- [#85](https://github.com/poanetwork/metamask-extension/pull/85): (Upgrade) node, npm packages versions
- [#84](https://github.com/poanetwork/metamask-extension/pull/84): (Fix) Change green color
- [#83](https://github.com/poanetwork/metamask-extension/pull/83): (Feature) Changing of password
- [#83](https://github.com/poanetwork/metamask-extension/pull/83), [#92](https://github.com/poanetwork/metamask-extension/pull/92): (Feature) Changing of password
- [#81](https://github.com/poanetwork/metamask-extension/pull/81): (Feature) Deanonymize private network
- [#80](https://github.com/poanetwork/metamask-extension/pull/80): (Feature) Remove imported account
- [#78](https://github.com/poanetwork/metamask-extension/pull/78): (Fix) Link to POA explorer for POA networks
Expand Down
10 changes: 0 additions & 10 deletions old-ui/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,16 +168,6 @@ App.prototype.renderAppBar = function () {
height: '38px',
position: 'relative',
zIndex: 12,
/* borderBottom: (
props.currentView.name === 'config' ||
props.currentView.name === 'add-token' ||
props.currentView.name === 'info' ||
props.currentView.name === 'qr' ||
props.currentView.name === 'reveal-seed-conf' ||
props.currentView.name === 'createVaultComplete' ||
props.currentView.name === 'restoreVault' ||
props.currentView.name === 'import-menu'
) ? '1px solid #e2e2e2' : 'none',*/
},
}, [

Expand Down
1 change: 0 additions & 1 deletion old-ui/app/components/mini-account-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ AccountPanel.prototype.genIcon = function (seed, picOrder) {
h('i.contract', {
style: {
fontSize: '42px',
transform: 'translate(0px, -16px)',
},
}),
])
Expand Down
4 changes: 2 additions & 2 deletions old-ui/app/components/pending-tx.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function mapStateToProps (state) {
unapprovedMsgs: state.metamask.unapprovedMsgs,
unapprovedPersonalMsgs: state.metamask.unapprovedPersonalMsgs,
unapprovedTypedMessages: state.metamask.unapprovedTypedMessages,
index: state.appState.currentView.context,
index: state.appState.currentView.pendingTxIndex || 0,
warning: state.appState.warning,
network: state.metamask.network,
provider: state.metamask.provider,
Expand Down Expand Up @@ -519,7 +519,7 @@ PendingTx.prototype.miniAccountPanelForRecipient = function () {
])
} else {
return h(MiniAccountPanel, {
picOrder: 'left',
picOrder: 'right',
}, [

h('span.font-small', {
Expand Down
6 changes: 3 additions & 3 deletions old-ui/app/conf-tx.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function mapStateToProps (state) {
unapprovedMsgs: state.metamask.unapprovedMsgs,
unapprovedPersonalMsgs: state.metamask.unapprovedPersonalMsgs,
unapprovedTypedMessages: state.metamask.unapprovedTypedMessages,
index: state.appState.currentView.context,
index: state.appState.currentView.pendingTxIndex || 0,
warning: state.appState.warning,
network: state.metamask.network,
provider: state.metamask.provider,
Expand Down Expand Up @@ -52,8 +52,8 @@ ConfirmTxScreen.prototype.render = function () {
}

var unconfTxList = txHelper(unapprovedTxs, unapprovedMsgs, unapprovedPersonalMsgs, unapprovedTypedMessages, network)

var txData = unconfTxList[props.index] || {}
const ind = props.index || 0
var txData = unconfTxList[ind] || {}
var txParams = txData.params || {}

log.info(`rendering a combined ${unconfTxList.length} unconf msg & txs`)
Expand Down
5 changes: 1 addition & 4 deletions old-ui/app/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -532,8 +532,6 @@ input.large-input {
}

.identity-panel .identicon-wrapper {
margin-bottom: 10px;
margin-top: 10px;
display: flex;
align-items: center;
}
Expand All @@ -547,8 +545,7 @@ input.large-input {
}

.identity-panel i {
margin-top: 32px;
margin-right: 6px;
margin-left: 6px;
color: #ffffff;
}

Expand Down
12 changes: 7 additions & 5 deletions ui/app/reducers/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ function reduceApp (state, action) {
gasIsLoading: false,
}, state.appState)

let curPendingTxIndex = appState.currentView.pendingTxIndex || 0

switch (action.type) {
// dropdown methods
case actions.NETWORK_DROPDOWN_OPEN:
Expand Down Expand Up @@ -425,7 +427,7 @@ function reduceApp (state, action) {
return extend(appState, {
currentView: {
name: 'confTx',
context: action.id ? indexForPending(state, action.id) : 0,
pendingTxIndex: action.id ? indexForPending(state, action.id) : 0,
},
transForward: action.transForward,
warning: null,
Expand Down Expand Up @@ -481,18 +483,18 @@ function reduceApp (state, action) {
transForward: true,
currentView: {
name: 'confTx',
context: ++appState.currentView.context,
pendingTxIndex: ++curPendingTxIndex,
warning: null,
},
})

case actions.VIEW_PENDING_TX:
const context = indexForPending(state, action.value)
const pendingTxIndex = indexForPending(state, action.value)
return extend(appState, {
transForward: true,
currentView: {
name: 'confTx',
context,
pendingTxIndex,
warning: null,
},
})
Expand All @@ -502,7 +504,7 @@ function reduceApp (state, action) {
transForward: false,
currentView: {
name: 'confTx',
context: --appState.currentView.context,
pendingTxIndex: --curPendingTxIndex,
warning: null,
},
})
Expand Down

0 comments on commit 97f01e7

Please sign in to comment.