aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/app.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-12-21 05:53:14 +0800
committerDan Finlay <dan@danfinlay.com>2016-12-21 07:24:08 +0800
commit931ae5f64a233b472c3dada8aa6af77e0bffad5e (patch)
treec5223496a95e474d90df1565a858f3715240c274 /ui/app/app.js
parent674b2689826c770092a3dfee7fe76fb83c0b444a (diff)
downloadtangerine-wallet-browser-931ae5f64a233b472c3dada8aa6af77e0bffad5e.tar
tangerine-wallet-browser-931ae5f64a233b472c3dada8aa6af77e0bffad5e.tar.gz
tangerine-wallet-browser-931ae5f64a233b472c3dada8aa6af77e0bffad5e.tar.bz2
tangerine-wallet-browser-931ae5f64a233b472c3dada8aa6af77e0bffad5e.tar.lz
tangerine-wallet-browser-931ae5f64a233b472c3dada8aa6af77e0bffad5e.tar.xz
tangerine-wallet-browser-931ae5f64a233b472c3dada8aa6af77e0bffad5e.tar.zst
tangerine-wallet-browser-931ae5f64a233b472c3dada8aa6af77e0bffad5e.zip
Make notices confirmation configurable
- Confirm button will now dismiss the lost accounts array.
Diffstat (limited to 'ui/app/app.js')
-rw-r--r--ui/app/app.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/ui/app/app.js b/ui/app/app.js
index 2fa6415dd..886bc987a 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -17,6 +17,7 @@ const SendTransactionScreen = require('./send')
const ConfirmTxScreen = require('./conf-tx')
// notice
const NoticeScreen = require('./notice')
+const lostAccountsNotice = require('../lib/lost-accounts-notice')
// other views
const ConfigScreen = require('./config')
const InfoScreen = require('./info')
@@ -55,6 +56,8 @@ function mapStateToProps (state) {
network: state.metamask.network,
provider: state.metamask.provider,
forgottenPassword: state.appState.forgottenPassword,
+ lastUnreadNotice: state.metamask.lastUnreadNotice,
+ lostAccounts: state.metamask.lostAccounts,
}
}
@@ -366,8 +369,19 @@ App.prototype.renderPrimary = function () {
}
}
+ // notices
if (!props.noActiveNotices) {
- return h(NoticeScreen, {key: 'NoticeScreen'})
+ return h(NoticeScreen, {
+ notice: props.lastUnreadNotice,
+ key: 'NoticeScreen',
+ onConfirm: () => props.dispatch(actions.markNoticeRead(notice)),
+ })
+ } else if (props.lostAccounts && props.lostAccounts.length > 0) {
+ return h(NoticeScreen, {
+ notice: lostAccountsNotice(props.lostAccounts),
+ key: 'LostAccountsNotice',
+ onConfirm: () => props.dispatch(actions.markAccountsFound()),
+ })
}
// show current view