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

Commit

Permalink
minimum visits and minduration not persisting when changed
Browse files Browse the repository at this point in the history
  • Loading branch information
jkup committed Nov 26, 2016
1 parent 9dab193 commit f30aee8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
6 changes: 1 addition & 5 deletions app/ledger.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ const doAction = (action) => {

case settings.MINIMUM_VISIT_TIME:
if (action.value <= 0) break

synopsis.options.minDuration = action.value * 1000
synopsis.options.minDuration = action.value
updatePublisherInfo()
break

Expand Down Expand Up @@ -1226,9 +1225,6 @@ var getStateInfo = (state) => {
ledgerInfo.paymentId = state.properties.wallet.paymentId
ledgerInfo.passphrase = state.properties.wallet.keychains.passphrase

ledgerInfo.minDuration = synopsis.options.minDuration
ledgerInfo.minPublisherVisits = synopsis.options.minPublisherVisits

ledgerInfo.created = !!state.properties.wallet
ledgerInfo.creating = !ledgerInfo.created

Expand Down
12 changes: 6 additions & 6 deletions js/about/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -1014,8 +1014,8 @@ class PaymentsTab extends ImmutableComponent {
}

get advancedSettingsContent () {
const minDuration = this.props.ledgerData.get('minDuration')
const minPublisherVisits = this.props.ledgerData.get('minPublisherVisits')
const minDuration = this.props.ledgerData.getIn(['synopsisOptions', 'minDuration'])
const minPublisherVisits = this.props.ledgerData.getIn(['synopsisOptions', 'minPublisherVisits'])

return <div className='board'>
<div className='panel advancedSettings'>
Expand All @@ -1025,11 +1025,11 @@ class PaymentsTab extends ImmutableComponent {
<SettingItem>
<select
className='form-control'
defaultValue={minDuration || 8}
defaultValue={minDuration || 8000}
onChange={changeSetting.bind(null, this.props.onChangeSetting, settings.MINIMUM_VISIT_TIME)}>>
<option value='5'>5 seconds</option>
<option value='8'>8 seconds</option>
<option value='60'>1 minute</option>
<option value='5000'>5 seconds</option>
<option value='8000'>8 seconds</option>
<option value='60000'>1 minute</option>
</select>
</SettingItem>
</SettingsList>
Expand Down

0 comments on commit f30aee8

Please sign in to comment.