diff --git a/app/ledger.js b/app/ledger.js index 9151f7ec1e1..c05a0838ddc 100644 --- a/app/ledger.js +++ b/app/ledger.js @@ -671,6 +671,7 @@ var initialize = (paymentsEnabled) => { getStateInfo(state) try { + var timeUntilReconcile clientprep() client = ledgerClient(state.personaId, underscore.extend(state.options, { roundtrip: roundtrip }, clientOptions), @@ -679,7 +680,7 @@ var initialize = (paymentsEnabled) => { // Scenario: User enables Payments, disables it, waits 30+ days, then // enables it again -> reconcileStamp is in the past. // In this case reset reconcileStamp to the future. - let timeUntilReconcile = client.timeUntilReconcile() + try { timeUntilReconcile = client.timeUntilReconcile() } catch (ex) {} let ledgerWindow = (synopsis.options.numFrames - 1) * synopsis.options.frameSize if (typeof timeUntilReconcile === 'number' && timeUntilReconcile < -ledgerWindow) { client.setTimeUntilReconcile(null, (err, stateResult) => { @@ -1856,6 +1857,8 @@ var getStateInfo = (state) => { var info = state.paymentInfo var then = underscore.now() - msecs.year + if (!state.properties.wallet) return + ledgerInfo.paymentId = state.properties.wallet.paymentId ledgerInfo.passphrase = state.properties.wallet.keychains.passphrase diff --git a/package.json b/package.json index 70b38faa530..1f743cd1bf2 100644 --- a/package.json +++ b/package.json @@ -105,7 +105,7 @@ "keytar": "^3.0.0", "l20n": "^3.5.1", "ledger-balance": "^0.9.0", - "ledger-client": "^0.9.14", + "ledger-client": "^0.9.15", "ledger-geoip": "^0.9.0", "ledger-publisher": "^0.9.4", "lru-cache": "^1.0.0",