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

use environment variables to control ledger-* package options #3462

Merged
merged 1 commit into from
Aug 26, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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