Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Migrates the contribution amounts from old USD setting to new BAT setting #11722

Merged
merged 1 commit into from
Oct 31, 2017
Merged

Migrates the contribution amounts from old USD setting to new BAT setting #11722

merged 1 commit into from
Oct 31, 2017

Conversation

bsclifton
Copy link
Member

Fixes #11719

Auditors: @NejcZdovc, @evq, @petemill

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.

Test Plan:

  • Use an older version of Brave (0.18.36 for example)
  • Enable payments and set contribution amount as one of the original amounts (like $10 for example)
  • Run a build with this fix in it
  • In preferences#payments, you should notice it should be 25 BAT if USD was $5, 50 if $10, 75 if $15, 100 if $20
  • Exit Brave
  • Open the ledger-state.json file and inspect, looking for properties.fee.amount
  • This should have the new value (25, 50, 75, or 100) not the old value (5, 10, 15, 20)

Reviewer Checklist:

Tests

  • Adequate test coverage exists to prevent regressions
  • Tests should be independent and work correctly when run individually or as a suite ref
  • New files have MPL2 license header

…ting

Fixes #11719

Auditors: @NejcZdovc, @evq, @petemill

Test Plan:
- Use an older version of Brave (0.18.36 for example)
- Enable payments and set contribution amount as one of the original amounts (like $10 for example)
- Run a build with this fix in it
- In preferences#payments, you should notice it should be 25 BAT if USD was $5, 50 if $10, 75 if $15, 100 if $20
- Exit Brave
- Open the ledger-state.json file and inspect, looking for properties.fee.amount
- This should have the new value (25, 50, 75, or 100) not the old value (5, 10, 15, 20)
@codecov-io
Copy link

codecov-io commented Oct 30, 2017

Codecov Report

Merging #11722 into master will increase coverage by 0.1%.
The diff coverage is 88.23%.

@@            Coverage Diff            @@
##           master   #11722     +/-   ##
=========================================
+ Coverage   52.01%   52.12%   +0.1%     
=========================================
  Files         269      269             
  Lines       25534    25553     +19     
  Branches     4069     4074      +5     
=========================================
+ Hits        13282    13319     +37     
+ Misses      12252    12234     -18
Flag Coverage Δ
#unittest 52.12% <88.23%> (+0.1%) ⬆️
Impacted Files Coverage Δ
app/browser/api/ledger.js 32.41% <88.23%> (+1.57%) ⬆️
js/actions/appActions.js 17.11% <0%> (+0.6%) ⬆️

Copy link
Contributor

@NejcZdovc NejcZdovc left a comment

Choose a reason for hiding this comment

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

++ looks good to me

@NejcZdovc NejcZdovc merged commit b27ca58 into brave:master Oct 31, 2017
NejcZdovc added a commit that referenced this pull request Oct 31, 2017
Migrates the contribution amounts from old USD setting to new BAT setting
NejcZdovc added a commit that referenced this pull request Oct 31, 2017
Migrates the contribution amounts from old USD setting to new BAT setting
NejcZdovc added a commit that referenced this pull request Oct 31, 2017
Migrates the contribution amounts from old USD setting to new BAT setting
@NejcZdovc
Copy link
Contributor

master b27ca58
0.21 2c4c72b
0.20 a42cac1
0.19 c211947

@bsclifton bsclifton deleted the contribution-amount-migration branch October 31, 2017 07:37
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Contribution amounts were not updated during BTC => BAT conversion
5 participants