Brave-browser: Add a setting to be able to completely reset rewards

Created on 3 Jun 2020  路  7Comments  路  Source: brave/brave-browser

We should add a button in rewards page where user can clear rewards and reset everything in pre-opt in state. When clicking on a button we should be clear what this will do and link to FAQ page with even more info. User should type in something like reset to confirm decision.

To accomplish that we need to do the following.

  • delete this files

    • ads_service folder

    • rewards_service folder

    • Rewards.log

  • reset data in

    • publisher_info_db (should just be deleted and initialization of db should be triggered)

    • Preferences (under brave_rewards)

  • clear states in webui

    • extension panel

    • rewards page

For a reference from muon times: https://github.com/brave/brave-browser/issues/1192

ODesktop QA Pass-Linux QA Pass-Win64 QA Pass-macOS QYes featurrewards prioritP2 privacy release-noteinclude

Most helpful comment

We should also add a link to this reset page from brave://settings/clearBrowserData so that we can close https://github.com/brave/brave-browser/issues/926 at the same time.

All 7 comments

This also has potential to lose BAT if there was any virtual BAT; @NejcZdovc @evq

correct and we need to be really clear in modal about it

We should also add a link to this reset page from brave://settings/clearBrowserData so that we can close https://github.com/brave/brave-browser/issues/926 at the same time.

Text recommendation "Your (XYZ) BATs and other Rewards data will be permanently lost if you reset your wallet. Please ensure you have verified your wallet with Uphold so can keep your BAT" -- for users with any VG and/or User funds

"Your Rewards data will be permanently lost if you reset your wallet" -- for users with no VG or User funds

Double Confirm - "Are you sure you want to reset your Rewards Wallet?"

@NejcZdovc When rewards is reset, the ads_service folder is NOT removed from the profile folder. This step is failing as per the test plan https://github.com/brave/brave-core/pull/5913. Can you review the test plan and let us know if it's not expected then we will file an issue.

  1. As per the description Rewards.logs should be deleted, but actually it's not deleted. Is this correct?

Verification passed on

Brave | 1.12.104 Chromium: 84.0.4147.89聽(Official Build)聽dev聽(64-bit)
-- | --
Revision | 19abfe7bcba9318a0b2a6bc6634a67fc834aa592-refs/branch-heads/4147@{#852}
OS | Windows聽10 OS Version 1903 (Build 18362.959)


Verification passed on

Brave | 1.12.107 Chromium: 84.0.4147.105聽(Official Build)聽(64-bit)
-- | --
Revision | a6b12dfad6663f13a7e16e9a42a6a4975374096b-refs/branch-heads/4147@{#943}
OS | Ubuntu 18.04 LTS

  • Verified the test plan from https://github.com/brave/brave-core/pull/5913
  • Verified Reset is present
    image
  • Verified Warning message is shown.
    image
  • Verified ability to cancel the reset
  • Verified publisher_info_db file, rewards_service folder and ads_service folder are removed on reset
  • Verified that both rewards page and panel gets reset to join rewards screen
    image
  • Verified that brave.rewards and brave.ads are reset in Preference file

Also verified in German (DE) locale


Verified passed with

Brave | 1.12.108 Chromium: 84.0.4147.105聽(Official Build)聽(64-bit)
-- | --
Revision | a6b12dfad6663f13a7e16e9a42a6a4975374096b-refs/branch-heads/4147@{#943}
OS | macOS Version 10.14.6 (Build 18G3020)
  • Verified test plan from https://github.com/brave/brave-core/pull/5913
  • After enabling Rewards, confirmed ads_service folder, rewards_service folder, Rewards.log, and publisher_info_db all exist in the profile folder. Also confirmed that in the Preferences file for that profile, brave_ads and rewards sections were populated with data.
  • Navigated to brave://rewards-internals and noted payment ID value.
  • Went to reset Rewards and saw this message:
    Screen Shot 2020-08-11 at 11 56 56 AM

  • After clicking on Reset button, got a confirmation modal:
    Screen Shot 2020-08-11 at 11 57 06 AM

  • Confirmed clicking Cancel closes that prompt. Confirmed clicking OK resets Rewards UI to expected state (brave://rewards page and panel both display pre-opt-in states)
    Screen Shot 2020-08-11 at 12 03 57 PM

  • Going to brave://rewards-internals reflects that BR is not enabled:
    Screen Shot 2020-08-11 at 12 03 46 PM

  • Confirmed ads_service folder, rewards_service folder, Rewards.log, and publisher_info_db are all removed from the profile folder.

  • Confirmed that in the Preferences file for that profile, brave_ads and rewards sections are no longer populated with previous data.
  • Confirmed able to re-join Rewards and all expected data is created in profile folder. Confirmed payment ID on brave://rewards-internals is different than previous value.
  • Confirmed able to restore a wallet after re-joining rewards post reset.
  • Confirmed able to connect to a verified KYC'd Uphold account after re-joining rewards post reset.
  • Encountered and logged https://github.com/brave/brave-browser/issues/11125 - crash occurs when resetting Rewards if Rewards or Ads is toggled off.
Was this page helpful?
0 / 5 - 0 ratings