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

summary table should be cleared when another wallet is restored #1559

Closed
kjozwiak opened this issue Oct 13, 2018 · 5 comments · Fixed by brave/brave-core#777
Closed

summary table should be cleared when another wallet is restored #1559

kjozwiak opened this issue Oct 13, 2018 · 5 comments · Fixed by brave/brave-core#777

Comments

@kjozwiak
Copy link
Member

Description

When you accept a grant with a new wallet, and then restore another wallet, the grant that was accepted with the first wallet still appears in the summary table. We should be clearing the summary table as the accepted grant mentioned above isn't associated with the new restored wallet.

Steps to Reproduce

  1. install the latest beta and enable rewards
  2. once enabled, accept a grant under chrome://rewards
  3. once the grant was accepted, you should notice it being listed under the summary table
  4. restore another wallet via the wallet Settings -> Restore your Wallet

You'll notice that the accepted grant wasn't removed from the summary table

Actual result:

screen shot 2018-10-12 at 6 02 28 pm

Notice that the Grant dropdown menu has been removed below the total as a new wallet was imported. However, the original 25 BAT that was accepted remained in the summary table.

Expected result:

We should be clearing anything that's associated with a wallet once another wallet has been restored.

Reproduces how often:

100% reproducible using the above STR.

Brave version (chrome://version info)

Brave 0.55.13 Chromium: 70.0.3538.54 (Official Build) beta (64-bit)
Revision 4f8e578b6680574714e9ed3bb9f02922b4dde40d-refs/branch-heads/3538@{#937}
OS Mac OS X

Reproducible on current release:

  • Does it reproduce on brave-browser dev/beta builds?

Yes, reproducible on both dev and beta builds:

Brave 0.56.3 Chromium: 70.0.3538.45 (Official Build) dev (64-bit)
Revision cbdc32e4334458954e9def214d7e5fa1ca1960eb-refs/branch-heads/3538@{#830}
OS Mac OS X
Brave 0.55.13 Chromium: 70.0.3538.54 (Official Build) beta (64-bit)
Revision 4f8e578b6680574714e9ed3bb9f02922b4dde40d-refs/branch-heads/3538@{#937}
OS Mac OS X
  • Does it reproduce on browser-laptop?

N/A as b-l didn't have a summary table that displayed accepted grants.

@kjozwiak kjozwiak added this to the 0.56.x milestone Oct 13, 2018
@NejcZdovc NejcZdovc modified the milestones: 1.0, 0.57.x - Dev Oct 22, 2018
@NejcZdovc NejcZdovc self-assigned this Oct 25, 2018
@NejcZdovc NejcZdovc modified the milestones: 0.56.x - Beta, 0.57.x - Dev Oct 29, 2018
@NejcZdovc NejcZdovc assigned jasonrsadler and unassigned NejcZdovc Oct 29, 2018
@bbondy bbondy modified the milestones: 0.57.x - Dev, 1.x Backlog Oct 30, 2018
@NejcZdovc NejcZdovc added priority/P4 Planned work. We expect to get to it "soon". priority/P3 The next thing for us to work on. It'll ride the trains. labels Oct 31, 2018
@NejcZdovc NejcZdovc removed the priority/P4 Planned work. We expect to get to it "soon". label Oct 31, 2018
@NejcZdovc NejcZdovc modified the milestones: 1.x Backlog, 0.59.x - Nightly Nov 2, 2018
@davidtemkin
Copy link

@NejcZdovc @jenn-rhim @jasonrsadler @kjozwiak @mandar-brave

Not so sure about this. When a wallet is restored, it seems to me that we should change the source of payments from that point forward to be the newly restored wallet. However, the transaction history (including history of contributions, tips, and so on) I believe should not be cleared, just as the Auto-Contribute table remains intact, and the Monthly Tips table remain intact, etc. A given user would want previous transactions as part of the record (including on monthly statements) regardless of a change in wallets (e.g., payment source).

I would expect anything in the Grants popdown to be replaced upon wallet restore, as grants are attached to a given wallet.

(This does raise the question of how a user would entirely clear Brave Rewards state. Currently you'd need to delete the user profile to do so, as turning rewards on/off does not do it (it just pauses activity), and under the logic here, wallet restore wouldn't do it either. But we do not need to solve that here).

Thoughts?

@jasonrsadler
Copy link

The contributions are attached to a given wallet as well. @NejcZdovc Do we currently (or is it in the works) for users to download a tx history pdf? I would say we should advise users with a tx history to backup or save the reports before restoring.

@davidtemkin
Copy link

@jasonrsadler This is not a technical question or a matter of how the underlying implementation works. The question is about what model we want to present to the user. I do not believe we should turn "restore wallet" into "reset Brave Rewards". It means just that -- "restore wallet", not "delete old reports", "clear my transaction history", etc.

This was discussed recently in the context of another issue; @jenn-rhim and @NejcZdovc weighed in. I believe the conclusion in that context was that we should replace the wallet proper when restoring, and not replace/clear anything else.

cc @mandar-brave

@jasonrsadler
Copy link

Of course. I was responding in a user-context sort of way. A consideration is if a user restores a wallet and we leave the summary, are there any drawbacks to a user wondering what wallet something on the summary came from? Just putting my 2 cents but I'll let you and others make the decision :)

@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Dec 11, 2018

Verification passed on

Brave 0.58.11 Chromium: 71.0.3578.80 (Official Build) beta (64-bit)
Revision 2ac50e7249fbd55e6f517a28131605c9fb9fe897-refs/branch-heads/3578@{#860}
OS Windows
  • Verified on fresh profile, after accepting UGP grants and restoring another wallet is clearing the summary of previous wallet
    image
  • Verified on Upgraded profile, after restoring new wallet previous wallet summary is getting erased
    image

Verification passed on

Brave 0.58.11 Chromium: 71.0.3578.80 (Official Build) beta (64-bit)
Revision 2ac50e7249fbd55e6f517a28131605c9fb9fe897-refs/branch-heads/3578@{#860}
OS Linux

Verified passed with

Brave 0.58.11 Chromium: 71.0.3578.80 (Official Build) beta(64-bit)
Revision 2ac50e7249fbd55e6f517a28131605c9fb9fe897-refs/branch-heads/3578@{#860}
OS Mac OS X

Prior to restoring a wallet:
screen shot 2018-12-12 at 4 12 10 pm
screen shot 2018-12-12 at 4 12 16 pm

After restoring a wallet:
screen shot 2018-12-12 at 4 12 59 pm
screen shot 2018-12-12 at 4 13 07 pm

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.

8 participants