diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2017-02-11 05:12:24 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-11 05:12:24 +0800 |
commit | 65f50ec7eeb40237084d99c737a2b768edbc578a (patch) | |
tree | 635de9094fc24e56bb22c00c033a544b1b06bed3 /app/scripts/notice-controller.js | |
parent | 01e43c789c29668dafb718aa68d9eee76788298b (diff) | |
parent | 8f72748732dcb4f5835a745a41f85c4105ed256d (diff) | |
download | tangerine-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.js | 6 |
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) |