aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/app.js
diff options
context:
space:
mode:
authorFrankie <frankie.diamond@gmail.com>2016-12-24 04:48:36 +0800
committerFrankie <frankie.diamond@gmail.com>2016-12-24 04:48:36 +0800
commitfa3e708f34fce523601c39b3131bdbe858d2f85f (patch)
tree9cb3b8fb5622aa23d4856e21405f8939505d3271 /ui/app/app.js
parentfde69ea0baf32b5d2a6932b73f4772e983aef552 (diff)
parent2ab34760b0e2e006c0b87722e8397c642eb86981 (diff)
downloadtangerine-wallet-browser-fa3e708f34fce523601c39b3131bdbe858d2f85f.tar.gz
tangerine-wallet-browser-fa3e708f34fce523601c39b3131bdbe858d2f85f.tar.zst
tangerine-wallet-browser-fa3e708f34fce523601c39b3131bdbe858d2f85f.zip
Merge branch 'dev' into TxManager
Diffstat (limited to 'ui/app/app.js')
-rw-r--r--ui/app/app.js18
1 files changed, 16 insertions, 2 deletions
diff --git a/ui/app/app.js b/ui/app/app.js
index 2fa6415dd..6da0c3b1d 100644
--- a/ui/app/app.js
+++ b/ui/app/app.js
@@ -16,7 +16,8 @@ const AccountDetailScreen = require('./account-detail')
const SendTransactionScreen = require('./send')
const ConfirmTxScreen = require('./conf-tx')
// notice
-const NoticeScreen = require('./notice')
+const NoticeScreen = require('./components/notice')
+const generateLostAccountsNotice = 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(props.lastUnreadNotice)),
+ })
+ } else if (props.lostAccounts && props.lostAccounts.length > 0) {
+ return h(NoticeScreen, {
+ notice: generateLostAccountsNotice(props.lostAccounts),
+ key: 'LostAccountsNotice',
+ onConfirm: () => props.dispatch(actions.markAccountsFound()),
+ })
}
// show current view