-
Notifications
You must be signed in to change notification settings - Fork 977
Start ledger process and load extension (if needed) before opening Rewards panel #12409
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
Start ledger process and load extension (if needed) before opening Rewards panel #12409
Conversation
178aa15
to
21a3319
Compare
21a3319
to
457c3d8
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.
Code here LGTM! 😄
I had deleted some comments when thinking things through; I was thinking to self, "maybe add pref_change_registrar check for ads preference too (similar to BraveComponentLoader::CheckRewardsStatus
)"... but that felt like a hacky suggestion
One thought I did have though EnsureBrowserContextKeyedServiceFactoriesBuilt
gets called at profile creation. We could add the call to AddRewardsExtension
in the RewardsServiceFactory
(ex: inside BuildServiceInstanceFor
)
@bsclifton I agree that extension loading should be managed from one place in the code. Unfortunately, as we've baked more UI into the rewards extension, we've added more paths that need the extension loaded. Ultimately though, we'll want to stop using the extension for the panel altogether. |
@bsclifton @zenparsing If it's OK, I'm going to keep this as-is since the current change is completely isolated to adaptive captcha (that code isn't called from anywhere else) and we want to uplift this into |
Verification PASSED on
Verification notes can be found via https://github.com/brave/internal/issues/857#issuecomment-1053884823. |
Resolves brave/brave-browser#21311
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: