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

Commit

Permalink
add optimization suggested in #3195
Browse files Browse the repository at this point in the history
  • Loading branch information
mrose17 committed Aug 17, 2016
1 parent fcb444b commit 86583f1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/ledger.js
Original file line number Diff line number Diff line change
Expand Up @@ -756,14 +756,15 @@ var roundtrip = (params, options, callback) => {
var run = (delayTime) => {
var state
var ballots = client.ballots()
var siteSettings = appStore.getState().get('siteSettings')
var winners = ((synopsis) && (ballots > 0) && (synopsis.winners(ballots))) || []

console.log('\nledger client run: delayTime=' + delayTime)

try {
winners.forEach((winner) => {
var result
var siteSetting = appStore.getState().get('siteSettings').get(`https?://${winner}`)
var siteSetting = siteSettings.get(`https?://${winner}`)

if ((siteSetting) && (siteSetting.get('ledgerPayments') === false)) return

Expand Down

0 comments on commit 86583f1

Please sign in to comment.