-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix_: send accounts event on handling backed up accounts #5739
fix_: send accounts event on handling backed up accounts #5739
Conversation
Jenkins BuildsClick to see older builds (46)
|
abdb2b6
to
60b5499
Compare
cdddb32
to
f8fcc3a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
f8fcc3a
to
e34b2fb
Compare
f2b2d18
to
83dccb1
Compare
@@ -3376,6 +3379,18 @@ func (m *Messenger) handleSyncWatchOnlyAccount(message *protobuf.SyncAccount, fr | |||
return nil, err | |||
} | |||
|
|||
if m.config.accountsFeed != nil { | |||
var eventType accountsevent.EventType | |||
if acc.Removed { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have absolutely no idea how this sync thingy ends up actually adding or removing the account, are you sure we won't get 2 notifications (sent here and also wherever we had them before) for a single addition/removal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually was under the impression we had something like a "removeLater" flag when removing through sync, so the actual removal got done on the next app start, but I'm not super sure about that...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, that's not the case from what I experienced so far (from UI and checking the go code). When one of the synced devices adds/removes any accounts, it's immediately done, updates the DB and sends a signal to the UI of the same (that's why this function returns the acc).
d599f6e
to
71bc099
Compare
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
71bc099
to
5f2bd7d
Compare
Needed for status-im/status-mobile#18613
Summary
Issue:
The collectables are not fetched whenever a profile is recovered with multiple wallet accounts.
Root cause:
We don't send any accounts event whenever we handle the accounts from backed-up data. This makes watchers fail to react to it.
Changes / fixes:
This PR moves the
accountsFeed
frominitServices
to the status node config, and adds a reference to messenger config for sending events on handling backed-up data.