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 #3462 from brave/use-ledger-environment-variables
Browse files Browse the repository at this point in the history
use environment variables to control ledger-* package options
  • Loading branch information
diracdeltas committed Aug 26, 2016
2 parents a991cd3 + 6266920 commit abf548a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions app/ledger.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ const synopsisPath = path.join(app.getPath('userData'), 'ledger-synopsis.json')

var bootP = false
var client
const clientOptions = { loggingP: true, verboseP: true }
const clientOptions = { debugP: process.env.LEDGER_DEBUG,
loggingP: process.env.LEDGER_LOGGING,
verboseP: process.env.LEDGER_VERBOSE
}

/*
* publisher globals
Expand Down Expand Up @@ -349,8 +352,7 @@ var initialize = (onoff) => {
getStateInfo(state)
try {
client = (require('ledger-client'))(state.personaId,
underscore.defaults(underscore.extend(state.options, { roundtrip: roundtrip }),
clientOptions), state)
underscore.extend(state.options, { roundtrip: roundtrip }, clientOptions), state)
} catch (ex) {
return console.log('ledger client creation error: ' + ex.toString() + '\n' + ex.stack)
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"keytar": "^3.0.0",
"l20n": "^3.5.1",
"ledger-balance": "^0.8.46",
"ledger-client": "^0.8.48",
"ledger-client": "^0.8.49",
"ledger-publisher": "^0.8.47",
"lru_cache": "^1.0.0",
"random-lib": "2.1.0",
Expand Down

0 comments on commit abf548a

Please sign in to comment.