diff --git a/components/brave_new_tab_ui/rewards-utils.ts b/components/brave_new_tab_ui/rewards-utils.ts index ce0cba99c187..5ce6aa0c0c97 100644 --- a/components/brave_new_tab_ui/rewards-utils.ts +++ b/components/brave_new_tab_ui/rewards-utils.ts @@ -7,5 +7,5 @@ export const getTotalContributions = (report: NewTab.RewardsBalanceReport) => { return 0.0 } - return report.tips + report.contribute + report.donation + return report.tips + report.contribute + report.monthly } diff --git a/components/brave_rewards/resources/android_page/utils.ts b/components/brave_rewards/resources/android_page/utils.ts index 7ba2dd7bf545..aa05b32db5a6 100644 --- a/components/brave_rewards/resources/android_page/utils.ts +++ b/components/brave_rewards/resources/android_page/utils.ts @@ -2,8 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ -import BigNumber from 'bignumber.js' - export let actions: any = null export const getActions = () => actions @@ -40,15 +38,6 @@ export const generateContributionMonthly = (list: number[], rates: Record { - if (!report) { - return '0.0' - } - - const tips = new BigNumber(report.tips) - return new BigNumber(report.donation).plus(tips).dividedBy('1e18').toFixed(1, BigNumber.ROUND_DOWN) -} - export const tipsListTotal = (list: Rewards.Publisher[]) => { if (list.length === 0) { return 0.0 diff --git a/components/brave_rewards/resources/extension/brave_rewards/background/storage.ts b/components/brave_rewards/resources/extension/brave_rewards/background/storage.ts index 70c71c706fc8..5c12219fdb9a 100644 --- a/components/brave_rewards/resources/extension/brave_rewards/background/storage.ts +++ b/components/brave_rewards/resources/extension/brave_rewards/background/storage.ts @@ -19,7 +19,7 @@ export const defaultState: RewardsExtension.State = { balanceReport: { ads: 0.0, contribute: 0.0, - donation: 0.0, + monthly: 0.0, grant: 0.0, tips: 0.0 }, diff --git a/components/brave_rewards/resources/page/utils.ts b/components/brave_rewards/resources/page/utils.ts index 7ba2dd7bf545..aa05b32db5a6 100644 --- a/components/brave_rewards/resources/page/utils.ts +++ b/components/brave_rewards/resources/page/utils.ts @@ -2,8 +2,6 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ -import BigNumber from 'bignumber.js' - export let actions: any = null export const getActions = () => actions @@ -40,15 +38,6 @@ export const generateContributionMonthly = (list: number[], rates: Record { - if (!report) { - return '0.0' - } - - const tips = new BigNumber(report.tips) - return new BigNumber(report.donation).plus(tips).dividedBy('1e18').toFixed(1, BigNumber.ROUND_DOWN) -} - export const tipsListTotal = (list: Rewards.Publisher[]) => { if (list.length === 0) { return 0.0 diff --git a/components/definitions/newTab.d.ts b/components/definitions/newTab.d.ts index 1f08c8e24200..5817756841e5 100644 --- a/components/definitions/newTab.d.ts +++ b/components/definitions/newTab.d.ts @@ -141,7 +141,7 @@ declare namespace NewTab { export interface RewardsBalanceReport { ads: number contribute: number - donation: number + monthly: number grant: number tips: number } diff --git a/components/definitions/rewards.d.ts b/components/definitions/rewards.d.ts index 3550af340f09..ba00e0f4e436 100644 --- a/components/definitions/rewards.d.ts +++ b/components/definitions/rewards.d.ts @@ -200,7 +200,7 @@ declare namespace Rewards { export interface BalanceReport { ads: number contribute: number - donation: number + monthly: number grant: number tips: number } diff --git a/components/definitions/rewardsExtensions.d.ts b/components/definitions/rewardsExtensions.d.ts index b6fff3915b1b..768ede32925c 100644 --- a/components/definitions/rewardsExtensions.d.ts +++ b/components/definitions/rewardsExtensions.d.ts @@ -117,7 +117,7 @@ declare namespace RewardsExtension { export interface BalanceReport { ads: number contribute: number - donation: number + monthly: number grant: number tips: number }