aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/notice-controller.js
diff options
context:
space:
mode:
authorKevin Serrano <kevgagser@gmail.com>2017-02-11 05:12:24 +0800
committerGitHub <noreply@github.com>2017-02-11 05:12:24 +0800
commit65f50ec7eeb40237084d99c737a2b768edbc578a (patch)
tree635de9094fc24e56bb22c00c033a544b1b06bed3 /app/scripts/notice-controller.js
parent01e43c789c29668dafb718aa68d9eee76788298b (diff)
parent8f72748732dcb4f5835a745a41f85c4105ed256d (diff)
downloadtangerine-wallet-browser-65f50ec7eeb40237084d99c737a2b768edbc578a.tar.gz
tangerine-wallet-browser-65f50ec7eeb40237084d99c737a2b768edbc578a.tar.zst
tangerine-wallet-browser-65f50ec7eeb40237084d99c737a2b768edbc578a.zip
Merge pull request #1108 from MetaMask/disclaimer-notify
Integrate disclaimer with notification system
Diffstat (limited to 'app/scripts/notice-controller.js')
-rw-r--r--app/scripts/notice-controller.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/scripts/notice-controller.js b/app/scripts/notice-controller.js
index ba7c68df4..0d72760fe 100644
--- a/app/scripts/notice-controller.js
+++ b/app/scripts/notice-controller.js
@@ -35,12 +35,12 @@ module.exports = class NoticeController extends EventEmitter {
return Promise.resolve(true)
}
- markNoticeRead (notice, cb) {
+ markNoticeRead (noticeToMark, cb) {
cb = cb || function (err) { if (err) throw err }
try {
var notices = this.getNoticesList()
- var id = notice.id
- notices[id].read = true
+ var index = notices.findIndex((currentNotice) => currentNotice.id === noticeToMark.id)
+ notices[index].read = true
this.setNoticesList(notices)
const latestNotice = this.getLatestUnreadNotice()
cb(null, latestNotice)