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

Promotion guards #5485

Merged
merged 3 commits into from
May 11, 2020
Merged

Promotion guards #5485

merged 3 commits into from
May 11, 2020

Conversation

NejcZdovc
Copy link
Contributor

@NejcZdovc NejcZdovc commented May 7, 2020

Resolves brave/brave-browser#9662
Resolves brave/brave-browser#9660

Submitter Checklist:

Test Plan:

  • enable rewards
  • click on claim promotion (do not solve it)
  • open db and change promotion status to 1
  • solve a captcha
  • make sure that you see an error and status stays at 1
  • promotion should be cleared as well

Public key flow is covered with browser tests

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 May 7, 2020
@@ -193,6 +193,13 @@ void Promotion::OnGetAllPromotions(
return;
}

// even though that some promotions are corrupted
// we should display non corrupted ones either way
if (success == ledger::Result::CORRUPTED_DATA) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we should still continue for promotions that are not corrupted

@NejcZdovc NejcZdovc marked this pull request as ready for review May 8, 2020 07:55
@NejcZdovc NejcZdovc requested a review from a team May 8, 2020 07:55
@tmancey tmancey self-requested a review May 8, 2020 15:56
@NejcZdovc NejcZdovc added this to the 1.10.x - Nightly milestone May 9, 2020
Copy link
Collaborator

@tmancey tmancey left a comment

Choose a reason for hiding this comment

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

LGTM++

@NejcZdovc
Copy link
Contributor Author

CI failed on unrelated errors

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.

Guard claim promotion from the UI Do not insert promotion if public key is empty
4 participants