Skip to content

Commit

Permalink
Merge pull request #3860 from brave/ntp-ads-fix
Browse files Browse the repository at this point in the history
Fixing ads estimated earnings not updating on NTP widget
  • Loading branch information
bsclifton authored and ryanml committed Nov 2, 2019
1 parent d9564b8 commit fd10752
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/brave_new_tab_ui/api/initialData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export type PreInitialRewardsData = {

export type InitialRewardsData = {
onlyAnonWallet: boolean
adsEstimatedEarnings: boolean
adsEstimatedEarnings: number
reports: Record<string, NewTab.RewardsReport>
balance: NewTab.RewardsBalance
}
Expand Down
3 changes: 2 additions & 1 deletion components/brave_new_tab_ui/reducers/new_tab_reducer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,8 @@ export const newTabReducer: Reducer<NewTab.State | undefined> = (state: NewTab.S
const newRewardsState = {
onlyAnonWallet: initialRewardsDataPayload.onlyAnonWallet,
balance: initialRewardsDataPayload.balance,
totalContribution: getTotalContributions(initialRewardsDataPayload.reports)
totalContribution: getTotalContributions(initialRewardsDataPayload.reports),
adsEstimatedEarnings: initialRewardsDataPayload.adsEstimatedEarnings
}

state = {
Expand Down

0 comments on commit fd10752

Please sign in to comment.