question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fix monthly/weekly wallet usage ping parameter

See original GitHub issue

Description

Monthly and weekly usage flags for the wallet parameter in the usage ping, are set to true every day in the month and week. This results in inaccurate monthly and weekly user stats for the wallet.

The wallet usage monthly and weekly flags should only be set to true once during the relevant period, if the wallet was used in the period.

Steps to Reproduce

Testers can use the faketime CLI to fake the system time for the browser process.

MITM proxy is recommended to see the usage ping query parameters. The parameter to look out for is walletActive. The value is a bitfield: LSB is daily use, second bit is weekly use, MSB is monthly use. Example: A walletActive value of 7 would indicate a monthly, weekly and daily use.

  1. Set current date to Feb 8, 2022
  2. Install browser with a fresh state
  3. Allow usage ping to occur, activate wallet, close browser
    • confirm usage ping walletActive=0 (inactive)
  4. Increment the date by one day
  5. Open browser, wait for usage ping, open wallet, and close the browser
    • confirm usage ping walletActive=7 (daily, weekly, monthly)
  6. Increment the date by one day
  7. Open browser, wait for usage ping, and close the browser
    • confirm usage ping walletActive=1 (daily)
  8. Increment the date by 7 days
  9. Open browser, wait for usage ping, open wallet, and close the browser
    • confirm usage ping walletActive=0 (no use since last report)
  10. Increment the date by one day
  11. Open browser, wait for usage ping, and close the browser - confirm usage ping walletActive=3 (daily, weekly)
  12. Set date to the first day in the next month
  13. Open browser, wait for usage ping, open wallet, and close the browser - confirm usage ping walletActive=0 (no use since last report)
  14. Increment the date by one day
  15. Open browser, wait for usage ping, and close the browser - confirm usage ping walletActive=7 (monthly, daily, weekly)

Actual result:

Usage pings:

  1. Correct. walletActive=0
  2. Correct. walletActive=7
  3. Incorrect. walletActive=7
  4. Incorrect. walletActive=4
  5. Incorrect. walletActive=7
  6. Incorrect. walletActive=4
  7. Correct. walletActive=7

Expected result:

See notes in test plan above.

Reproduces how often:

Easily reproduced

Desktop Brave version:

Building from source.

Brave: 1.37.30 Chromium: 98.0.4758.87 (Developer Build) (64-bit) Revision: e4cd00f135fb4d8edc64c8aa6ecbe7cc79ebb3b2-refs/branch-heads/4758 OS: Linux

Version/Channel Information:

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

Other Additional Information:

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

Miscellaneous Information:

Raising PR soon. Will request uplift for upcoming release.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
kjozwiakcommented, Mar 1, 2022

Removing QA/Blocked as https://github.com/brave/brave-core/pull/12449 was uplifted into 1.36.x. However, this should be QA’d alongside https://github.com/brave/brave-core/pull/12277 using 1.36.109 or higher.

As discussed during the b-b meeting, @GeetaSarvadnya will run through a subset of the cases as this was already thoroughly verified on Nightly.

1reaction
DJAndriescommented, Feb 25, 2022

As discussed over the call, monthly usage is determined by calendar month and weekly usage is determined by the ISO week number of the year

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ping command basics for testing and troubleshooting - Red Hat
You can use the ping command to test name resolution services, too. If you ping a destination by IP address, and the ping...
Read more >
Ping wants to simplify global payments while helping Latin ...
Ping users create a free account in U.S. dollars to receive bank transfers in either their local currency or cryptocurrency.
Read more >
What Is a Digital Wallet? | How e-Wallets Work, Safety & Setup
A digital wallet is software that allows you to make payments right from your phone, easily navigate online checkouts and gain extra security....
Read more >
Change or remove the payment cards that you use with Apple ...
How to change the default card for Apple Pay on your iPhone. Open the Wallet app. Touch and hold the payment card that...
Read more >
Using the ping command to help determine the correct MTU ...
This article describes how to use the ping command to help determine if all Nutanix nodes and network equipment are using the correct...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found