Skip to content
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

[CHERRY PICK] fix_: fill missing community tokens in controlled communities (#5154) #5188

Merged
merged 1 commit into from
May 21, 2024

Conversation

jrainville
Copy link
Member

@jrainville jrainville commented May 17, 2024

Cherry pick of #5154

Needed for status-im/status-desktop#14679

On app start, fills controlled communities with missing deployed community tokens if there are.

Needed for status-im/status-desktop#14679

On app start, fills controlled communities with missing deployed community tokens if there are.
@status-im-auto
Copy link
Member

status-im-auto commented May 17, 2024

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 3b51cab #1 2024-05-17 20:53:36 ~4 min linux 📦zip
✔️ 3b51cab #1 2024-05-17 20:54:24 ~5 min ios 📦zip
✔️ 3b51cab #1 2024-05-17 20:54:54 ~5 min android 📦aar
✔️ 3b51cab #1 2024-05-17 21:35:48 ~46 min tests 📄log

@@ -481,6 +481,11 @@ func (m *Manager) Start() error {
if m.ownerVerifier != nil {
m.runOwnerVerificationLoop()
}

go func() {
_ = m.fillMissingCommunityTokens()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering if it makes sense to log something in case of error since fillMissingCommunityTokens returns an error? Did you maybe anticipate this might be too verbose?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do all the logs directly in fillMissingCommunityTokens. I could add an additional log here, but it would just repeat the error and lack the additional context.

@@ -513,6 +518,61 @@ func (m *Manager) runENSVerificationLoop() {
}()
}

// This function is mostly a way to fix any community that is missing tokens in its description
func (m *Manager) fillMissingCommunityTokens() error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me, this function looks hard to predict knowing that it's called in different go routines, but seems ok to me as well. I thought about using go channels as well, but it would require some deeper analysis.

@jrainville jrainville merged commit af66f51 into develop May 21, 2024
11 of 12 checks passed
@jrainville jrainville deleted the chore/cherry-pick-missing-tokens-fix branch May 21, 2024 16:00
chaitanyaprem pushed a commit that referenced this pull request May 28, 2024
…#5188)

Needed for status-im/status-desktop#14679

On app start, fills controlled communities with missing deployed community tokens if there are.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants