aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan <danjm.com@gmail.com>2018-01-16 09:41:06 +0800
committerChi Kei Chan <chikeichan@gmail.com>2018-01-16 10:32:25 +0800
commita4fd4f013fc0657920a452f04591dc26d4a5639e (patch)
treee96f05d56ec77e8b14f2a11262c88a0defce48a5
parentbaebf64afd594316a4e160ff1d046ea68bfc5c70 (diff)
downloadtangerine-wallet-browser-a4fd4f013fc0657920a452f04591dc26d4a5639e.tar
tangerine-wallet-browser-a4fd4f013fc0657920a452f04591dc26d4a5639e.tar.gz
tangerine-wallet-browser-a4fd4f013fc0657920a452f04591dc26d4a5639e.tar.bz2
tangerine-wallet-browser-a4fd4f013fc0657920a452f04591dc26d4a5639e.tar.lz
tangerine-wallet-browser-a4fd4f013fc0657920a452f04591dc26d4a5639e.tar.xz
tangerine-wallet-browser-a4fd4f013fc0657920a452f04591dc26d4a5639e.tar.zst
tangerine-wallet-browser-a4fd4f013fc0657920a452f04591dc26d4a5639e.zip
Restore display of all unconfirmed transactions.
-rw-r--r--ui/app/reducers/app.js68
1 files changed, 34 insertions, 34 deletions
diff --git a/ui/app/reducers/app.js b/ui/app/reducers/app.js
index b4950e9d9..c3ade5cdc 100644
--- a/ui/app/reducers/app.js
+++ b/ui/app/reducers/app.js
@@ -389,7 +389,7 @@ function reduceApp (state, action) {
return extend(appState, {
currentView: {
name: 'confTx',
- context: action.id ? indexForPending(state, action.id) : indexForLastPending(state),
+ context: action.id ? indexForPending(state, action.id) : 0,
},
transForward: action.transForward,
warning: null,
@@ -409,36 +409,36 @@ function reduceApp (state, action) {
case actions.COMPLETED_TX:
log.debug('reducing COMPLETED_TX for tx ' + action.value)
- // const otherUnconfActions = getUnconfActionList(state)
- // .filter(tx => tx.id !== action.value)
- // const hasOtherUnconfActions = otherUnconfActions.length > 0
-
- // if (hasOtherUnconfActions) {
- // log.debug('reducer detected txs - rendering confTx view')
- // return extend(appState, {
- // transForward: false,
- // currentView: {
- // name: 'confTx',
- // context: 0,
- // },
- // warning: null,
- // })
- // } else {
- log.debug('attempting to close popup')
- return extend(appState, {
- // indicate notification should close
- shouldClose: true,
- transForward: false,
- warning: null,
- currentView: {
- name: 'accountDetail',
- context: state.metamask.selectedAddress,
- },
- accountDetail: {
- subview: 'transactions',
- },
- })
- // }
+ const otherUnconfActions = getUnconfActionList(state)
+ .filter(tx => tx.id !== action.value)
+ const hasOtherUnconfActions = otherUnconfActions.length > 0
+
+ if (hasOtherUnconfActions) {
+ log.debug('reducer detected txs - rendering confTx view')
+ return extend(appState, {
+ transForward: false,
+ currentView: {
+ name: 'confTx',
+ context: 0,
+ },
+ warning: null,
+ })
+ } else {
+ log.debug('attempting to close popup')
+ return extend(appState, {
+ // indicate notification should close
+ shouldClose: true,
+ transForward: false,
+ warning: null,
+ currentView: {
+ name: 'accountDetail',
+ context: state.metamask.selectedAddress,
+ },
+ accountDetail: {
+ subview: 'transactions',
+ },
+ })
+ }
case actions.NEXT_TX:
return extend(appState, {
@@ -679,6 +679,6 @@ function indexForPending (state, txId) {
return index
}
-function indexForLastPending (state) {
- return getUnconfActionList(state).length
-}
+// function indexForLastPending (state) {
+// return getUnconfActionList(state).length
+// }