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

Db migration 2 #4252

Merged
merged 24 commits into from
Feb 28, 2020
Merged

Db migration 2 #4252

merged 24 commits into from
Feb 28, 2020

Conversation

NejcZdovc
Copy link
Contributor

@NejcZdovc NejcZdovc commented Dec 18, 2019

Resolves brave/brave-browser#6363
Resolves brave/brave-browser#7217

Submitter Checklist:

Test Plan:

  • make sure that exclude is working
  • general rewards test as this code is affecting everything related to rewards

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@NejcZdovc NejcZdovc self-assigned this Dec 19, 2019
@NejcZdovc NejcZdovc force-pushed the db-migration-2 branch 4 times, most recently from 538408e to 9d7c759 Compare January 10, 2020 21:06
@NejcZdovc NejcZdovc force-pushed the db-migration-2 branch 6 times, most recently from e912e75 to 662e486 Compare January 13, 2020 05:15
@NejcZdovc NejcZdovc force-pushed the db-migration-2 branch 13 times, most recently from d96a81d to 0c322a1 Compare January 23, 2020 17:24
@NejcZdovc NejcZdovc force-pushed the db-migration-2 branch 2 times, most recently from f7b3e73 to ee9e109 Compare February 10, 2020 08:55
@NejcZdovc NejcZdovc merged commit c8dff0f into master Feb 28, 2020
@NejcZdovc NejcZdovc deleted the db-migration-2 branch February 28, 2020 21:32
@LaurenWags
Copy link
Member

LaurenWags commented Feb 28, 2020

Verified the following on macOS using build from: https://bravesoftware.slack.com/archives/CMH8DU4TF/p1582876908014700

Clean profile (anon wallet):

  • Verify you are able to create a new wallet (join Rewards from panel)
  • Verify you are able to create a new wallet (join Rewards from brave://rewards page)
  • Verify when you enable Rewards from panel or brave://rewards, Ads are enabled by default if in an Ads region.
  • Verify you are able to restore a wallet.
  • Verify account balance shows correct BAT and USD value.
  • Verify you are able to successfully claim a UGP grant on staging env.
  • Verify you are able to successfully claim an ad grant on staging env.
  • Verify actions taken (claiming grant, tipping, auto-contribute) display in wallet panel.
  • Verify AC monthly budget shows correct BAT and USD value.
  • Verify you are able to exclude a publisher from the auto-contribute table by clicking on the x in auto-contribute table and popup list of sites.
  • Verify you are able to exclude a publisher by using the toggle on the Rewards Panel.
  • Verify you are able to perform an auto contribution.
  • Follow up of PR #4252- Attention % value resets to zero in BR panel  brave-browser#8463 Verify when you click on the BR panel while on a site, the panel displays site specific information (site favicon, domain, attention %).
  • Verify BR panel shows message about an unverified publisher.
  • Verify tip panel shows a message about unverified publisher.
  • Verify BR panel shows a verified checkmark for a verified creator.
  • Verify tip panel shows a verified checkmark for a verified creator.
  • Verify when you click on Send a tip, the custom tip banner displays if set up.
  • Verify you are able to make one-time tip and they display in Tips panel.
  • Verify you are able to make recurring tip and they display in Monthly Contributions panel.
    • Verify you are able to adjust your recurring tip amount from the BR panel.
  • Verify you can tip a verified website.
    • Verify the website displays in the auto-contribute list after specified amount of time/visits per settings.
  • Verify you can tip a verified YouTube creator.
    • Verify the YouTube creator displays in the auto-contribute list after specified amount of time/visits per settings.
  • Verify you can tip a verified Vimeo creator.
    • Verify the Vimeo creator displays in the auto-contribute list after specified amount of time/visits per settings.
  • Verify you can tip a verified Twitch creator.
  • Verify you can tip a verified Twitter user from the panel.
  • Verify you can tip a verified Twitter user via inline tip button.
    • Verify the in-line tip button is spaced properly (check when logged in and not logged in to Twitter).
  • Verify you can tip a verified Github user from the panel.
  • Verify you can tip a verified Github user via inline tip button.
    • Verify the Github creator displays in the auto-contribute list after specified amount of time/visits per settings.
  • Verify you can tip a verified Reddit user from the panel.
  • Verify you can tip a verified Reddit user via inline tip button.
  • Verify if you disable auto-contribute you are still able to tip creators.
  • Verify if auto-contribute is disabled AC does not occur.
  • Verify if Rewards is disabled AC does not occur.
  • Verify that disabling Rewards and enabling it again does not lose state.
  • Verify that disabling auto-contribute and enabling it again does not lose state.
  • Adjust min visit/time in settings. Visit some sites to verify they are added to the table after the specified settings.

Clean profile connected, non-KYC'd user wallet

  • Verify you are able to connect an non-KYC'd Uphold wallet to Rewards.
    • Verify if you have Brave controlled funds (ex. UGP grant), you can tip both connected and KYC'd creators.
    • n/a anymore Verify wallet balance in Brave updates when BAT is added to the Brave Browser card.
    • n/a anymore Verify if you only have user controlled BAT (BAT in Uphold only), you can only tip KYC'd creators, any tips to non-KYC'd creators go to the Pending Contributions list.

Clean profile KYC'd user wallet

  • Verify you are able to connect a KYC'd Uphold wallet to Rewards.
    • Verify if you have Brave controlled funds (ex. UGP grant), you can tip both connected and KYC'd creators.
    • Verify wallet balance in Brave updates when BAT is added to the Brave Browser card.
    • Verify if you only have user controlled BAT (BAT in Uphold only), you can only tip KYC'd creators, any tips to non-KYC'd creators go to the Pending Contributions list.
    • Verify you are able to AC
    • Verify you are able to contribute monthly tips

Upgrade case 1: Install 1.0. Set up data (Ads panel, AC list, one time and recurring tips, wallet balance, wallet summary items, etc). Update to PR builder version.

  • see note Verify when updating from above version Ads info in the panel is not lost. (Note - I was unable to get ad tokens on 1.0 (kept getting a 400 error from server), couldn't check this part for upgrade)
  • Verify the wallet balance is retained and wallet backup code isn't corrupted.
  • Verify auto-contribute list is not lost after upgrade.
  • Verify tips list is not lost after upgrade.
  • Verify wallet panel transactions list is not lost after upgrade.
  • Verify you are still able to tip and have AC go thru after upgrade.
  • Repeat above but with the addition of a KYC'd user wallet, confirm all works as expected.
  • Ran thru this case 2x

Upgrade case 2: Install current Release version (1.4.95 at this moment). Set up data (Ads panel, AC list, one time and recurring tips, wallet balance, wallet summary items, etc). Update to PR builder version.

  • Verify when updating from above version Ads info in the panel is not lost.
  • Verify the wallet balance is retained and wallet backup code isn't corrupted.
  • Verify auto-contribute list is not lost after upgrade.
  • Verify tips list is not lost after upgrade.
  • Verify wallet panel transactions list is not lost after upgrade.
  • Verify you are still able to tip and have AC go thru after upgrade.
  • see note Repeat above but with the addition of a KYC'd user wallet, confirm all works as expected. (Note - was unable to complete this part as Uphold was doing deploys to sandbox at this time: https://bravesoftware.slack.com/archives/C5Y1ER5PS/p1582927634004600?thread_ts=1582926842.004200&cid=C5Y1ER5PS)
  • Ran thru this case 2x

Upgrade Case 3: Install current Release version (1.4.95 at this moment). Disable AC via toggle.

  • Verify after updating to PR build auto-contribute is still disabled after upgrade.
  • Verify Ads and Rewards are still toggled on.

Upgrade Case 4: Install current Release version (1.4.95 at this moment). Disable Ads via toggle.

  • Verify after updating to PR build Ads is still disabled after upgrade.
  • Verify AC and Rewards are still toggled on.

Upgrade Case 5: Install current Release version (1.4.95 at this moment). Disable Rewards via toggle.

  • Verify after updating to PR build Rewards is still disabled after upgrade.

Encountered/Logged the following issues not mentioned above (but are not specific to this PR):
brave/brave-browser#8467


  • Verified the following on Windows 10 x64 using build from:
    https://bravesoftware.slack.com/archives/CMH8DU4TF/p1582876908014700
    Clean profile (anon wallet):
  • Verify you are able to create a new wallet. - [PASS]
  • Verify when you enable Rewards from panel or brave://rewards, Ads are enabled by default if in an Ads region. - [PASS]
  • Verify you are able to restore a wallet. - [restore any balanced wallet shows zero balance]
  • Verify account balance shows correct BAT and USD value. - [PASS]
  • Verify you are able to successfully claim a UGP grant on staging env.[PASS]
  • Verify you are able to successfully claim an ad grant on staging env. [restore any ad grants wallet shows zero balance]
  • Verify actions taken (claiming grant, tipping, auto-contribute) display in wallet panel.[PASS]
  • Verify AC monthly budget shows correct BAT and USD value. [PASS]
  • Verify you are able to exclude a publisher from the auto-contribute table by clicking on the x in auto-contribute table and popup list of sites.[PASS]
  • Verify you are able to exclude a publisher by using the toggle on the Rewards Panel.[PASS]
  • Verify you are able to perform an auto contribution.[PASS
  • Verify when you click on the BR panel while on a site, the panel displays site specific information (site favicon, domain, attention %).[PASS]
  • Verify BR panel shows message about an unverified publisher.[PASS]
  • Verify tip panel shows a message about unverified publisher.[PASS]
  • Verify BR panel shows a verified checkmark for a verified creator.[PASS]
  • Verify tip panel shows a verified checkmark for a verified creator.[PASS]
  • Verify when you click on Send a tip, the custom tip banner displays if set up.[PASS]
  • Verify you are able to make one-time tip and they display in Tips panel.[PASS]
  • Verify you are able to make recurring tip and they display in Monthly Contributions panel.[PASS]
    • Verify you are able to adjust your recurring tip amount from the BR panel.[PASS]
  • Verify you can tip a verified website.[PASS]
    • Verify the website displays in the auto-contribute list after specified amount of time/visits per settings.[PASS]
  • Verify you can tip a verified YouTube creator.[PASS]
    • Verify the YouTube creator displays in the auto-contribute list after specified amount of time/visits per settings.[PASS]
  • Verify you can tip a verified Vimeo creator.
    • Verify the Vimeo creator displays in the auto-contribute list after specified amount of time/visits per settings.[PASS]
  • Verify you can tip a verified Twitch creator.[PASS - Encountered Fix ledger initialization on iOS #6851]
    • Verify the Twitch creator displays in the auto-contribute list after specified amount of time/visits per settings.[PASS]
  • Verify you can tip a verified Twitter user from the panel.[PASS]
  • Verify you can tip a verified Twitter user via inline tip button.[PASS]
    • Verify the in-line tip button is spaced properly (check when logged in and not logged in to Twitter).[PASS]
  • Verify you can tip a verified Github user from the panel.[PASS]
  • Verify you can tip a verified Github user via inline tip button.[PASS]
    • Verify the Github creator displays in the auto-contribute list after specified amount of time/visits per settings.[PASS]
  • Verify you can tip a verified Reddit user from the panel.[PASS]
  • Verify you can tip a verified Reddit user via inline tip button.[PASS]
  • Verify if you disable auto-contribute you are still able to tip creators.[PASS]
  • Verify if auto-contribute is disabled AC does not occur.[PASS]
  • Verify if Rewards is disabled AC does not occur.[PASS]
  • Verify that disabling Rewards and enabling it again does not lose state.[PASS]
    • Verify when Rewards are toggled off (but Ads were not explicitly toggled off), there are no Ads logs recorded.[PASS]
  • Verify when Ads are toggled off, there are no Ad messages in the logs.[PASS]
  • Verify that disabling auto-contribute and enabling it again does not lose state.[PASS]
  • Adjust min visit/time in settings. Visit some sites to verify they are added to the table after the specified settings.[PASS]

Clean profile connected, non-KYC'd user wallet

  • Verify you are able to connect an non-KYC'd Uphold wallet to Rewards. [PASS]
    • Verify if you have Brave controlled funds (ex. UGP grant), you can tip both connected and KYC'd creators. [PASS]
    • Verify wallet balance in Brave updates when BAT is added to the Brave Browser card. [PASS]
    • Verify if you only have user controlled BAT (BAT in Uphold only), you can only tip KYC'd creators, any tips to non-KYC'd creators go to the Pending Contributions list.[PASS]

Clean profile KYC'd user wallet

@atommicios
Copy link

🙏

@brave brave deleted a comment from atommicios Mar 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move business logic OnTip into native lib Move ledger database to ledger native library
8 participants