aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/accounts/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/accounts/index.js')
-rw-r--r--ui/app/accounts/index.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/ui/app/accounts/index.js b/ui/app/accounts/index.js
index 1a42f7470..9cfab54e5 100644
--- a/ui/app/accounts/index.js
+++ b/ui/app/accounts/index.js
@@ -12,6 +12,10 @@ module.exports = connect(mapStateToProps)(AccountsScreen)
function mapStateToProps(state) {
+ const pendingTxs = valuesFor(state.metamask.unconfTxs)
+ const pendingMsgs = valuesFor(state.metamask.unconfMsgs)
+ const pending = pendingTxs.concat(pendingMsgs)
+
return {
accounts: state.metamask.accounts,
identities: state.metamask.identities,
@@ -19,6 +23,7 @@ function mapStateToProps(state) {
selectedAddress: state.metamask.selectedAddress,
currentDomain: state.appState.currentDomain,
scrollToBottom: state.appState.scrollToBottom,
+ pending,
}
}
@@ -62,12 +67,23 @@ AccountsScreen.prototype.render = function() {
},
[
identityList.map((identity) => {
+ const pending = this.props.pending.filter((txOrMsg) => {
+ if ('txParams' in txOrMsg) {
+ return txOrMsg.txParams.from === identity.address
+ } else if ('msgParams' in txOrMsg) {
+ return txOrMsg.msgParams.from === identity.address
+ } else {
+ return false
+ }
+ })
+
return h(AccountPanel, {
key: `acct-panel-${identity.address}`,
identity,
selectedAddress: this.props.selectedAddress,
accounts: this.props.accounts,
onShowDetail: this.onShowDetail.bind(this),
+ pending,
})
}),