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

Move data from ledger_state into preferences #9869

Closed
10 tasks done
NejcZdovc opened this issue May 21, 2020 · 1 comment · Fixed by brave/brave-core#5647
Closed
10 tasks done

Move data from ledger_state into preferences #9869

NejcZdovc opened this issue May 21, 2020 · 1 comment · Fixed by brave/brave-core#5647

Comments

@NejcZdovc
Copy link
Contributor

NejcZdovc commented May 21, 2020

We should move data from ledger_state file into preferences. We should move following data:

  • walletInfo->paymentId (wallet.payment_id)
  • walletInfo->keyInfoSeed (wallet.seed)
  • walletInfo->addressCARD_ID (wallet.anonymous_card_id)
  • bootStamp (creation_stamp)
  • reconcileStamp (ac.next_reconcile_stamp)
  • fee_amount (ac.amount)
  • user_changed_fee (do not persist, just use if for migrating ac.amount)
  • rewards_enabled (enabled)
  • auto_contribute (ac.enabled)
  • inline_tips (tips.inline_tips.*, we would have each entry per media type)

All business logic for setting this values should be done in shared lib. Example that needs to be fixed is RewardsServiceImpl::OnWalletInitialized

@NejcZdovc NejcZdovc self-assigned this May 22, 2020
@NejcZdovc NejcZdovc removed their assignment May 22, 2020
@NejcZdovc NejcZdovc self-assigned this May 25, 2020
NejcZdovc added a commit to brave/brave-core that referenced this issue May 25, 2020
NejcZdovc added a commit to brave/brave-core that referenced this issue May 27, 2020
NejcZdovc added a commit to brave/brave-core that referenced this issue May 29, 2020
NejcZdovc added a commit to brave/brave-core that referenced this issue May 31, 2020
NejcZdovc added a commit to brave/brave-core that referenced this issue Jun 2, 2020
@NejcZdovc NejcZdovc added this to the 1.11.x - Nightly milestone Jun 2, 2020
@GeetaSarvadnya
Copy link

GeetaSarvadnya commented Jun 24, 2020

Verification passed on


Brave | 1.11.73 Chromium: 83.0.4103.106 (Official Build) dev (64-bit)
-- | --
Revision | ce7134bb3d95141cd18f1e65772a4247f282d950-refs/branch-heads/4103@{#694}
OS | Windows 10 OS Version 1903 (Build 18362.900)

Test plan 1:

Test plan 2:

Test plan 3: - Working as expected

  • Verified that default values 1, 10, 100 are displayed correctly for unverified pubs in Tipping banner
  • Verified in both clean and upgraded profile
    image

Verified passed with

Brave | 1.11.85 Chromium: 83.0.4103.116 (Official Build) dev (64-bit)
-- | --
Revision | 8f0c18b4dca9b6699eb629be0f51810c24fb6428-refs/branch-heads/4103@{#716}
OS | macOS Version 10.14.6 (Build 18G3020)
  • Verified test plans from Move data from ledger_state into preferences brave-core#5647
  • Also verified the below upgrade scenarios:
    PASS 1. Install 1.10.x. Enable Rewards. Disable AC. Note backup words. Upgrade to 1.11.x Confirm AC still off after upgrade. Confirm backup words are still the same.
    PASS 2. Install 1.10.x. Enable Rewards. Disable Ads. Upgrade to 1.11.x Confirm Ads still off after upgrade.
    PASS 3. Install 1.10.x. Enable Rewards. Disable AC. Disable Rewards. Upgrade to 1.11.x Confirm Rewards still off after upgrade. Enable Rewards. Confirm AC still off.
    PASS 4. Install 1.10.x. Enable Rewards. Disable Rewards. Upgrade to 1.11.x Confirm Rewards still off after upgrade.
    PASS 5. Install 1.10.x. Enable Rewards. Adjust AC settings. Disable AC. Upgrade to 1.11.x. Confirm AC still off after upgrade. Enable AC. Confirm AC settings persisted.
    FAIL due to known issue, see note below 6. Install 1.10.x. Enable Rewards. Claim UGP grant. Adjust AC settings. Add sites to AC. Tip some sites. Set up some monthly recurring tips. Upgrade to 1.11.x Confirm all is the same and no data appears lost. Confirm wallet data is the same on brave://rewards-internals.
    PASS 7. Install 1.10.x. Enable Rewards. Restore anon user wallet. Upgrade to 1.11.x. Confirm balance is persisted. Confirm wallet data is the same on brave://rewards-internals. Confirm able to tip.
    PASS 8. Install 1.10.x. Enable Rewards. Connect KYC'd user wallet. Upgrade to 1.11.x. Confirm balance is persisted. Confirm wallet data is the same on brave://rewards-internals. Confirm able to tip.

Additional notes:


Verification passed on

Brave 1.11.89 Chromium: 83.0.4103.116 (Official Build) dev (64-bit)
Revision 8f0c18b4dca9b6699eb629be0f51810c24fb6428-refs/branch-heads/4103@{#716}
OS Ubuntu 18.04 LTS

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