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

Fixes tipping report inconsistencies #1126

Merged
merged 1 commit into from
Dec 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions components/brave_rewards/browser/rewards_service_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,7 @@ void RewardsServiceImpl::OnGrantFinish(ledger::Result result,
grant.probi);
}

GetCurrentBalanceReport();
TriggerOnGrantFinish(result, grant);
}

Expand All @@ -624,6 +625,7 @@ void RewardsServiceImpl::OnReconcileComplete(ledger::Result result,
GetCurrentTimestamp());
}

GetCurrentBalanceReport();
for (auto& observer : observers_)
observer.OnReconcileComplete(this,
result,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ export const onBalanceReports = (reports: Record<string, Rewards.Report>) => act
reports
})

export const getCurrentReport = () => action(types.GET_CURRENT_REPORT, {})

export const excludePublisher = (publisherKey: string) => action(types.ON_EXCLUDE_PUBLISHER, {
publisherKey
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ class SettingsPage extends React.Component<Props, {}> {
this.actions.getContributeList()
this.actions.checkImported()
this.actions.getAdsData()
this.actions.getCurrentReport()
}

componentWillUnmount () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,6 @@ export const enum types {
ON_IMPORTED_CHECK = '@@rewards/ON_IMPORTED_CHECK',
GET_ADS_DATA = '@@rewards/GET_ADS_DATA',
ON_ADS_DATA = '@@rewards/ON_ADS_DATA',
ON_ADS_SETTING_SAVE = '@@rewards/ON_ADS_SETTING_SAVE'
ON_ADS_SETTING_SAVE = '@@rewards/ON_ADS_SETTING_SAVE',
GET_CURRENT_REPORT = '@@rewards/GET_CURRENT_REPORT'
}
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,11 @@ const walletReducer: Reducer<Rewards.State | undefined> = (state: Rewards.State,
}
break
}
case types.GET_CURRENT_REPORT:
{
chrome.send('brave_rewards.getBalanceReports')
break
}
case types.ON_BALANCE_REPORTS:
{
state = { ...state }
Expand Down