mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge pull request #4602 from MetaMask/notice-controller-fix
notice controller - properly show new notices for non-new users
This commit is contained in:
commit
d910c35e90
@ -13,12 +13,15 @@ module.exports = class NoticeController extends EventEmitter {
|
||||
this.firstVersion = opts.firstVersion
|
||||
this.version = opts.version
|
||||
const initState = extend({
|
||||
noticesList: this._filterNotices(hardCodedNotices),
|
||||
noticesList: [],
|
||||
}, opts.initState)
|
||||
this.store = new ObservableStore(initState)
|
||||
// setup memStore
|
||||
this.memStore = new ObservableStore({})
|
||||
this.store.subscribe(() => this._updateMemstore())
|
||||
this._updateMemstore()
|
||||
// pull in latest notices
|
||||
this.updateNoticesList()
|
||||
}
|
||||
|
||||
getNoticesList () {
|
||||
@ -84,8 +87,8 @@ module.exports = class NoticeController extends EventEmitter {
|
||||
}
|
||||
|
||||
async _retrieveNoticeData () {
|
||||
// Placeholder for the API.
|
||||
return []
|
||||
// Placeholder for remote notice API.
|
||||
return hardCodedNotices
|
||||
}
|
||||
|
||||
_updateMemstore () {
|
||||
|
Loading…
Reference in New Issue
Block a user