mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
notice-controller - make markAllNoticesRead sync
This commit is contained in:
parent
e04f0c877b
commit
846038a69c
@ -58,7 +58,7 @@ module.exports = class NoticeController extends EventEmitter {
|
||||
}
|
||||
}
|
||||
|
||||
async markAllNoticesRead () {
|
||||
markAllNoticesRead () {
|
||||
const noticeList = this.getNoticesList()
|
||||
noticeList.forEach(notice => {
|
||||
notice.read = true
|
||||
|
@ -57,7 +57,7 @@ describe('notice-controller', function () {
|
||||
|
||||
noticeController.setNoticesList(testList)
|
||||
|
||||
await noticeController.markAllNoticesRead()
|
||||
noticeController.markAllNoticesRead()
|
||||
|
||||
const unreadNotices = noticeController.getUnreadNotices()
|
||||
assert.equal(unreadNotices.length, 0)
|
||||
|
Loading…
Reference in New Issue
Block a user