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

tokens transferred to uphold not marked as redeemed in DB #9967

Closed
LaurenWags opened this issue May 27, 2020 · 3 comments · Fixed by brave/brave-core#5670
Closed

tokens transferred to uphold not marked as redeemed in DB #9967

LaurenWags opened this issue May 27, 2020 · 3 comments · Fixed by brave/brave-core#5670

Comments

@LaurenWags
Copy link
Member

Description

Found while testing #9891 / brave/brave-core#5619 (comment).

After staging ad grant moved to sandbox uphold account, unblinded tokens aren't correctly marked as redeemed in the database.

Steps to Reproduce

  1. Launched with /Applications/Brave\ Browser\ Nightly.app/Contents/MacOS/Brave\ Browser\ Nightly --enable-logging=stderr --vmodule=*/bat-native-ledger/*=6,*/brave_rewards/*=6 --log-level=2 --rewards=staging=true --brave-ads-staging (note, changes to logging introduced with 1.11.x)
  2. Enable rewards
  3. Claim ad grant (restore a wallet with one waiting if necessary)
  4. Close Browser
  5. Go to publisher_info_db and in unblinded_tokens table mark some tokens as redeemed. To do this, I copied the timestamp from created_at to the redeemed_at column and set it 1 minute ahead.
  6. Save changes.
  7. Launch again with logging and connect KYC wallet.
  8. Wait for tokens to be transferred
  9. Go to uphold account and confirm transfer.
  10. Go back to brave://rewards page

Actual result:

Your balance appears doubled. Going to DB you can see tokens not marked as redeemed.

Expected result:

tokens marked as redeemed

Reproduces how often:

easily

Brave version (brave://version info)

Brave | 1.11.28 Chromium: 81.0.4044.138 (Official Build) nightly (64-bit)
-- | --
Revision | 8c6c7ba89cc9453625af54f11fd83179e23450fa-refs/branch-heads/4044@{#999}
OS | macOS Version 10.14.6 (Build 18G3020)

Version/Channel Information:

  • Can you reproduce this issue with the current release?
  • Can you reproduce this issue with the beta channel?
  • Can you reproduce this issue with the dev channel?
  • Can you reproduce this issue with the nightly channel? yes

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields?
  • Does the issue resolve itself when disabling Brave Rewards?
  • Is the issue reproducible on the latest version of Chrome?

Miscellaneous Information:

cc @NejcZdovc

@LaurenWags
Copy link
Member Author

LaurenWags commented Jun 16, 2020

Labelling as QA/Blocked until https://github.com/brave/bat-support/issues/11 / #10315 is addressed

@LaurenWags
Copy link
Member Author

Removing QA/Blocked, #10315 has been fixed with https://github.com/brave/brave-browser/releases/tag/v1.11.92

@LaurenWags
Copy link
Member Author

LaurenWags commented Jul 8, 2020

Verified passed with

Brave | 1.11.92 Chromium: 84.0.4147.68 (Official Build) dev (64-bit)
-- | --
Revision | e7b7234037639b407e69c5428c891ce018cd6c0d-refs/branch-heads/4147@{#772}
OS | macOS Version 10.14.6 (Build 18G3020)
  • Verified STR from description
  • Confirmed tokens transferred to Uphold:
[ RESPONSE - OnTransferAnonToExternalWallet ]
> Url: https://ledger-staging.mercury.basicattentiontoken.org/v2/wallet/d6ac12e2-ff91-4b3a-a2dd-e3cb0075659e/claim
> Result: Success
> HTTP Code: 200

Screen Shot 2020-07-08 at 8 49 35 AM

  • Confirmed balance does not appear doubled after transfer:

Screen Shot 2020-07-08 at 8 49 54 AM

  • Confirmed tokens marked as redeemed in DB (note, the first 4 were the ones I manually marked as redeemed per the STR):

Screen Shot 2020-07-08 at 8 50 44 AM


Verification passed on

Brave | 1.11.92 Chromium: 84.0.4147.68 (Official Build) dev (64-bit)
-- | --
Revision | e7b7234037639b407e69c5428c891ce018cd6c0d-refs/branch-heads/4147@{#772}
OS | Windows 10 OS Version 1903 (Build 18362.900)

  • Verified STR from the description
  • Confirmed tokens transferred to Uphold:
[ RESPONSE - OnTransferAnonToExternalWallet ]
> Url: https://ledger-staging.mercury.basicattentiontoken.org/v2/wallet/839521cf-e387-4f6e-a102-dfb87e326299/claim
> Result: Success
> HTTP Code: 200

image

  • Confirmed balance does not appear doubled after transfer:
    image

  • Confirmed tokens marked as redeemed in DB (note, the first 8 were the ones I manually marked as redeemed )
    image


Verification passed on

Brave 1.11.92 Chromium: 84.0.4147.68 (Official Build) dev (64-bit)
Revision e7b7234037639b407e69c5428c891ce018cd6c0d-refs/branch-heads/4147@{#772}
OS Ubuntu 18.04 LTS
  • Verified STR from the description
  • Confirmed tokens transferred to Uphold:
[ RESPONSE - OnTransferAnonToExternalWallet ]
> Url: https://ledger-staging.mercury.basicattentiontoken.org/v2/wallet/38438f48-42da-4efc-b21d-81741c9709d2/claim
> Result: Success
> HTTP Code: 200

image

  • Confirmed balance does not appear doubled after transfer
  • Confirmed tokens marked as redeemed in DB (note, the first 8 were the ones I manually marked as redeemed )
    image

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