-
Notifications
You must be signed in to change notification settings - Fork 892
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
Publisher updates flow #1457
Publisher updates flow #1457
Conversation
60f5db1
to
7c30622
Compare
void LedgerImpl::SetPublisherInfo(std::unique_ptr<ledger::PublisherInfo> info, | ||
ledger::PublisherInfoCallback callback) { | ||
uint64_t window_id) { |
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.
if we get rid of the callback, how does the caller find out about errors?
void RewardsServiceImpl::OnNormalizedPublisherListSaved( | ||
std::unique_ptr<ledger::PublisherInfoList> list) { | ||
if (!list) { | ||
LOG(ERROR) << "Problem saving normalized publishers " |
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.
we can't just log this error and ignore it here, SaveNormalizedPublisherList
needs a callback
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.
sure, we can add callback to go back to native ledger. What should we do in native ledger with this callback?
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.
what we were doing with save publisher actions was redirecting callback to dummy one
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.
see below
c1a0513
to
2f200e0
Compare
b215fc2
to
1776a80
Compare
cef247a
to
dc0dfd7
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.
Pertaining to:
brave/brave-browser#3015
brave/brave-browser#3135
Both issues were addressed. A general smoke test of Rewards (adding sites to a-c, removal and restoration) produced no unexpected behavior or errors. This is now just awaiting a final look from brian j and a rebase. Good work!
dc0dfd7
to
73c0d12
Compare
rebased, cc @bridiver for a final review |
73c0d12
to
afc4ac4
Compare
afc4ac4
to
c47c337
Compare
@@ -82,7 +82,11 @@ export const rewardsPanelReducer = (state: RewardsExtension.State | undefined, a | |||
const id = getWindowId(tab.windowId) | |||
const publishers: Record<string, RewardsExtension.Publisher> = state.publishers | |||
const publisher = publishers[id] | |||
chrome.braveRewards.getPublisherData(tab.windowId, tab.url, tab.favIconUrl || '', payload.publisherBlob || '') | |||
|
|||
if ((payload.onlyDiff && publisher && publisher.tabUrl !== tab.url) || !payload.onlyDiff) { |
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.
This seems to be causing problems with getting media publishers in panel
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.
this is working as expected, fix for the panel not working #2178
Resolves brave/brave-browser#2973
Resolves brave/brave-browser#3015
Resolves brave/brave-browser#3135
Submitter Checklist:
npm test brave_unit_tests && npm test brave_browser_tests
) ongit rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist: