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

Refactored and migrated Rewards category from category to type #3630

Merged
merged 1 commit into from
Oct 9, 2019

Conversation

tmancey
Copy link
Collaborator

@tmancey tmancey commented Oct 8, 2019

Fixes brave/brave-browser#6350

Submitter Checklist:

Test Plan:

  • Confirm Auto Contributions work as expected after an upgrade
  • Confirm Pending Contributions (sites in the pending list) work as expected after an upgrade
  • Confirm Auto Contributions work as expected for a fresh install
  • Confirm Pending Contributions (sites in the pending list) work as expected for a fresh install

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.

@tmancey tmancey force-pushed the issues/6350 branch 4 times, most recently from aea1d73 to 0bec0fb Compare October 8, 2019 14:32
kylehickinson
kylehickinson previously approved these changes Oct 8, 2019
kylehickinson
kylehickinson previously approved these changes Oct 8, 2019
const auto comma_separated_from_columns = base::JoinString(from_columns, ",");
const auto comma_separated_to_columns = base::JoinString(to_columns, ",");

return base::StringPrintf("INSERT INTO %s (%s) SELECT %s FROM %s;",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I would place every param in separate line as it's easier to read for me. Like this

return base::StringPrintf("INSERT INTO %s (%s) SELECT %s FROM %s;",
    to.c_str(),
    comma_separated_to_columns.c_str(),
    comma_separated_from_columns.c_str(),
    from.c_str());

Copy link
Contributor

@NejcZdovc NejcZdovc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. components/brave_rewards/resources/extension/brave_rewards/background/events/rewardsEvents.ts line 101 (category -> type)

  2. components/brave_rewards/resources/page/brave_rewards_page.tsx line 205 (category -> type)

  3. components/definitions/chromel.d.ts line 128 (category -> type)

  4. components/definitions/rewards.d.ts line 193 (category -> type) and Category to RewardsType. Category can be deleted

  5. please add migration tests like we had them for previous version. This way we know that db files and structure is correct

@tmancey tmancey force-pushed the issues/6350 branch 6 times, most recently from c2aaff8 to 1e62a40 Compare October 9, 2019 08:29
@tmancey tmancey force-pushed the issues/6350 branch 2 times, most recently from 3a1353e to a12f513 Compare October 9, 2019 09:24
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.

Refactor and migrate Rewards category from category to type
3 participants