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

Adds redeemed_at to unblinded tokens, removes delete #5017

Merged
merged 1 commit into from
May 5, 2020

Conversation

NejcZdovc
Copy link
Contributor

@NejcZdovc NejcZdovc commented Mar 23, 2020

Resolves brave/brave-browser#8181

Submitter Checklist:

Test Plan:

  • enable rewards
  • claim promotion
  • make a tip
  • make sure that amount is deducted and data in DB is reflected (redeem* fields are populated)

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 Mar 23, 2020
@NejcZdovc NejcZdovc added the CI/skip Do not run CI builds (except noplatform) label May 4, 2020
@NejcZdovc NejcZdovc changed the title Adds claimed_at to unblinded tokens, removes delete Adds spent_at to unblinded tokens, removes delete May 4, 2020
@NejcZdovc NejcZdovc changed the title Adds spent_at to unblinded tokens, removes delete Adds redeemed_at to unblinded tokens, removes delete May 4, 2020
@NejcZdovc NejcZdovc force-pushed the token-claimed branch 2 times, most recently from a409e2b to d3043c6 Compare May 4, 2020 06:48
@NejcZdovc NejcZdovc added this to the 1.10.x - Nightly milestone May 4, 2020
@@ -86,77 +82,4 @@ TEST_F(UnblindedTest, NotEnoughFunds) {
});
}

TEST_F(UnblindedTest, PromotionExpiredDeleteToken) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

deleted as we are not deleting tokens anymore

@NejcZdovc NejcZdovc removed the CI/skip Do not run CI builds (except noplatform) label May 4, 2020
@NejcZdovc NejcZdovc marked this pull request as ready for review May 4, 2020 09:52
@NejcZdovc
Copy link
Contributor Author

PR for updating DB schema and changelog https://github.com/brave/rewards/pull/6

@@ -34,6 +34,7 @@ index|sqlite_autoindex_sku_order_1|sku_order|
index|sqlite_autoindex_sku_order_items_1|sku_order_items|
index|sqlite_autoindex_sku_transaction_1|sku_transaction|
index|unblinded_tokens_creds_id_index|unblinded_tokens|CREATE INDEX unblinded_tokens_creds_id_index ON unblinded_tokens (creds_id)
index|unblinded_tokens_redeem_id_index|unblinded_tokens|CREATE INDEX unblinded_tokens_redeem_id_index ON unblinded_tokens (redeem_id)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we ever search on redeem_id?

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 will in the future

@@ -728,7 +728,7 @@ class LedgerImpl : public ledger::Ledger {
const std::string& order_id,
ledger::GetSKUTransactionCallback callback);

virtual void GetUnblindedTokensByBatchTypes(
virtual void GetSpendableUnblindedTokensByBatchTypes(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good name!

@NejcZdovc NejcZdovc requested a review from zenparsing May 4, 2020 17:52
@NejcZdovc NejcZdovc merged commit de613a9 into master May 5, 2020
@NejcZdovc NejcZdovc deleted the token-claimed branch May 5, 2020 05:34
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.

Do not delete unblinded tokens
2 participants