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

Commit

Permalink
Merge pull request #12527 from bsclifton/update-contribution-amounts
Browse files Browse the repository at this point in the history
Add new amounts and show 1 decimal point of precision for values
  • Loading branch information
bsclifton authored Jan 5, 2018
2 parents ec24079 + cc71605 commit 779180c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions app/renderer/components/preferences/payment/enabledContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ class EnabledContent extends ImmutableComponent {
value={getSetting(settings.PAYMENTS_CONTRIBUTION_AMOUNT, this.props.settings)}
onChange={changeSetting.bind(null, this.props.onChangeSetting, settings.PAYMENTS_CONTRIBUTION_AMOUNT)}>
{
[10, 25, 50, 75, 100].map((amount) => {
[5.0, 7.5, 10.0, 17.5, 25.0, 50.0, 75.0, 100.0].map((amount) => {
let alternative = ''
if (ledgerData.has('currentRate')) {
const converted = batToCurrencyString(amount, ledgerData)
Expand All @@ -317,8 +317,9 @@ class EnabledContent extends ImmutableComponent {
alternative = `(${converted})`
}
}
const displayAmount = Number(amount).toFixed(1)

return <option value={amount}>{amount} BAT {alternative}</option>
return <option value={amount}>{displayAmount} BAT {alternative}</option>
})
}
</FormDropdown>
Expand Down
2 changes: 1 addition & 1 deletion tools/lib/transactionHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const generateSurveyorIds = function (count) {
}

const generateContribution = function () {
let randomContributionAmount = [10, 25, 50, 75, 100][ Math.round(Math.random() * 3) ]
let randomContributionAmount = [5.0, 7.5, 10.0, 17.5, 25.0, 50.0, 75.0, 100.0][ Math.round(Math.random() * 3) ]
const currency = 'BAT'

let rates = {
Expand Down

0 comments on commit 779180c

Please sign in to comment.