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

Add a setting to be able to completely reset rewards #10064

Closed
NejcZdovc opened this issue Jun 3, 2020 · 7 comments · Fixed by brave/brave-core#5913
Closed

Add a setting to be able to completely reset rewards #10064

NejcZdovc opened this issue Jun 3, 2020 · 7 comments · Fixed by brave/brave-core#5913

Comments

@NejcZdovc
Copy link
Contributor

NejcZdovc commented Jun 3, 2020

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: #1192

@NejcZdovc NejcZdovc added feature/rewards priority/P2 A bad problem. We might uplift this to the next planned release. labels Jun 3, 2020
@mandar-brave
Copy link

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

@NejcZdovc
Copy link
Contributor Author

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

@fmarier
Copy link
Member

fmarier commented Jun 3, 2020

We should also add a link to this reset page from brave://settings/clearBrowserData so that we can close #926 at the same time.

@NejcZdovc
Copy link
Contributor Author

blocked by #9526

NejcZdovc added a commit to brave/brave-core that referenced this issue Jun 19, 2020
@NejcZdovc NejcZdovc removed the blocked label Jun 29, 2020
@mandar-brave
Copy link

mandar-brave commented Jun 29, 2020

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 added a commit to brave/brave-core that referenced this issue Jul 2, 2020
@NejcZdovc NejcZdovc added this to the 1.12.x - Nightly milestone Jul 7, 2020
NejcZdovc added a commit to brave/brave-core that referenced this issue Jul 7, 2020
@rebron rebron changed the title Add possibility to completely reset rewards Add settings to completely reset rewards Jul 21, 2020
@rebron rebron changed the title Add settings to completely reset rewards Add a setting to be able to completely reset rewards Jul 21, 2020
@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Jul 27, 2020

@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 brave/brave-core#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?

@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Jul 29, 2020

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 Adds option to reset rewards brave-core#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 Adds option to reset rewards brave-core#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 Reset Rewards crashes the browser in certain cases #11125 - crash occurs when resetting Rewards if Rewards or Ads is toggled off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants