From fdb3b2d9d83c18d88865d774287d331806451036 Mon Sep 17 00:00:00 2001 From: Emerick Rogul Date: Thu, 2 Mar 2023 14:39:09 -0500 Subject: [PATCH] Remove note from Reset Rewards modal --- browser/ui/webui/brave_webui_source.cc | 1 - .../browser/test/rewards_browsertest.cc | 17 --------------- .../resources/page/components/pageWallet.tsx | 10 --------- .../ui/components/modalReset/index.tsx | 21 ------------------- .../ui/components/modalReset/spec.tsx | 1 - .../resources/brave_components_strings.grd | 1 - 6 files changed, 51 deletions(-) diff --git a/browser/ui/webui/brave_webui_source.cc b/browser/ui/webui/brave_webui_source.cc index 426dce143954..1f43db95f47a 100644 --- a/browser/ui/webui/brave_webui_source.cc +++ b/browser/ui/webui/brave_webui_source.cc @@ -601,7 +601,6 @@ void CustomizeWebUIHTMLSource(content::WebUI* web_ui, { "rewardsResetConfirmation", IDS_BRAVE_UI_REWARDS_RESET_CONFIRMATION }, { "rewardsResetConsent", IDS_BRAVE_UI_REWARDS_RESET_CONSENT }, { "rewardsResetText", IDS_BRAVE_UI_REWARDS_RESET_TEXT }, - { "rewardsResetTextFunds", IDS_BRAVE_UI_REWARDS_RESET_TEXT_FUNDS }, { "rewardsTokenGrantTitle", IDS_REWARDS_WIDGET_TOKEN_GRANT_TITLE }, { "rewardsSummary", IDS_BRAVE_UI_REWARDS_SUMMARY }, { "rewardsVBATNoticeText1", IDS_REWARDS_VBAT_NOTICE_TEXT1 }, diff --git a/components/brave_rewards/browser/test/rewards_browsertest.cc b/components/brave_rewards/browser/test/rewards_browsertest.cc index 9172f258286e..653728b0eb71 100644 --- a/components/brave_rewards/browser/test/rewards_browsertest.cc +++ b/components/brave_rewards/browser/test/rewards_browsertest.cc @@ -287,23 +287,6 @@ IN_PROC_BROWSER_TEST_F(RewardsBrowserTest, ResetRewards) { "By resetting, your current Brave Rewards profile will be deleted"); } -IN_PROC_BROWSER_TEST_F(RewardsBrowserTest, ResetRewardsWithBAT) { - rewards_browsertest_util::CreateRewardsWallet(rewards_service_); - context_helper_->LoadRewardsPage(); - contribution_->AddBalance(promotion_->ClaimPromotionViaCode()); - - rewards_browsertest_util::WaitForElementThenClick( - contents(), "[data-test-id=manage-wallet-button]"); - - rewards_browsertest_util::WaitForElementToAppear( - contents(), - "#modal"); - - rewards_browsertest_util::WaitForElementToContain( - contents(), "[data-test-id='funds-warning-text']", - "Note: You currently have 30 BAT estimated earnings this month"); -} - IN_PROC_BROWSER_TEST_F(RewardsBrowserTest, EnableRewardsWithBalance) { // Load a balance into the user's wallet rewards_browsertest_util::CreateRewardsWallet(rewards_service_); diff --git a/components/brave_rewards/resources/page/components/pageWallet.tsx b/components/brave_rewards/resources/page/components/pageWallet.tsx index 6318c7d7ad87..9933868bfb6a 100644 --- a/components/brave_rewards/resources/page/components/pageWallet.tsx +++ b/components/brave_rewards/resources/page/components/pageWallet.tsx @@ -480,15 +480,6 @@ class PageWallet extends React.Component { ) } - getInternalFunds = () => { - const { balance } = this.props.rewardsData - if (!balance.wallets) { - return 0 - } - - return (balance.wallets.blinded || 0) - } - isWalletProviderEnabled = (walletProvider: string) => { const { currentCountryCode, parameters } = this.props.rewardsData const regions = parameters.walletProviderRegions[walletProvider] || null @@ -589,7 +580,6 @@ class PageWallet extends React.Component { ? : null } diff --git a/components/brave_rewards/resources/ui/components/modalReset/index.tsx b/components/brave_rewards/resources/ui/components/modalReset/index.tsx index a98354f422d2..de8b1049839f 100644 --- a/components/brave_rewards/resources/ui/components/modalReset/index.tsx +++ b/components/brave_rewards/resources/ui/components/modalReset/index.tsx @@ -25,7 +25,6 @@ export interface Props { testId?: string funds?: string onReset: () => void - internalFunds: number } interface State { @@ -106,18 +105,6 @@ export default class ModalReset extends React.PureComponent { }) } - const getFundsWarningText = () => { - return formatMessage(getLocale('rewardsResetTextFunds'), { - placeholders: { - $1: ( - - {this.props.internalFunds.toString()} BAT - - ) - } - }) - } - return ( <> @@ -125,14 +112,6 @@ export default class ModalReset extends React.PureComponent { {getResetText()} - { - this.props.internalFunds > 0 && - - - {getFundsWarningText()} - - - } { id='modal' onClose={doNothing} onReset={doNothing} - internalFunds={0} {...props} /> diff --git a/components/resources/brave_components_strings.grd b/components/resources/brave_components_strings.grd index 4b4b4668f484..4027c565a194 100644 --- a/components/resources/brave_components_strings.grd +++ b/components/resources/brave_components_strings.grd @@ -785,7 +785,6 @@ Attention Are you sure you want to reset your Brave Rewards? By resetting, your current Brave Rewards profile will be deleted and you will start again with a completely new Brave Rewards profile. Before proceeding, $1learn more$2 about resetting, just to be safe. - Note: You currently have $15 BAT estimated earnings this month that will be lost if you reset now. I understand that my current Brave Rewards profile and Brave Rewards data will be deleted from my device, and I've read the $1support article about resetting$2. Token Grants Claimed Rewards Summary