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

Refactor balance report #4237

Merged
merged 5 commits into from
Dec 19, 2019
Merged

Refactor balance report #4237

merged 5 commits into from
Dec 19, 2019

Conversation

NejcZdovc
Copy link
Contributor

@NejcZdovc NejcZdovc commented Dec 16, 2019

Resolves brave/brave-browser#7329

Submitter Checklist:

Test Plan:

plan 1:

  • enable rewards
  • claim grant
  • do one time tip
  • make sure that it's shown in panel/settings page wallet summary
  • check if it's displayed on new tab page

plan 2:

  • go to master
  • do plan 1
  • switch to this PR
  • start browser
  • make sure that data on settings page, panel and new tab page are correct

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 added this to the 1.4.x - Nightly milestone Dec 16, 2019
@NejcZdovc NejcZdovc self-assigned this Dec 16, 2019
@NejcZdovc NejcZdovc force-pushed the balance-report branch 2 times, most recently from 5794012 to a9c856f Compare December 16, 2019 09:47
@NejcZdovc NejcZdovc changed the title Balance report Refactor balance report Dec 16, 2019
@NejcZdovc NejcZdovc marked this pull request as ready for review December 16, 2019 09:57
@NejcZdovc NejcZdovc requested a review from a team December 16, 2019 09:57
@NejcZdovc NejcZdovc force-pushed the balance-report branch 4 times, most recently from 40f4396 to a7a1aee Compare December 17, 2019 13:38
@NejcZdovc NejcZdovc mentioned this pull request Dec 18, 2019
32 tasks
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 NejcZdovc requested a review from masparrow December 18, 2019 17:06
components/brave_new_tab_ui/storage.ts Show resolved Hide resolved

newReports[report.first] = newReport;
void LedgerToServiceBalanceReport(
ledger::BalanceReportInfoPtr report,
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps Obtain/Get/BalanceReportFromLedger or similar...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is conversion from one type to another

Copy link
Contributor

Choose a reason for hiding this comment

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

ConvertLedgerReportToBalancereport then?

@@ -1261,7 +1261,7 @@ public void OnGetCurrentBalanceReport(String[] report) {
tv.setText(toInsert);
tvUSD.setText(textUSD);
}
if (!report[i].equals("0")) {
if (report[i] != 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: != 0.0

@NejcZdovc
Copy link
Contributor Author

@Brandon-T checked iOS code as @kylehickinson is on PTO

@mihaiplesa mihaiplesa merged commit 6646319 into master Dec 19, 2019
@NejcZdovc NejcZdovc deleted the balance-report branch December 19, 2019 12:04
bsclifton pushed a commit that referenced this pull request Jan 27, 2020
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 GetAllBalanceReports
7 participants