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

Commit

Permalink
Use the latest version of ledger-* packages
Browse files Browse the repository at this point in the history
In support of #3350, use
the latest version of the ledger-client package that makes available a
client.getWalletPassphrase method

auditor: @ayumi
  • Loading branch information
mrose17 committed Sep 27, 2016
1 parent 814a723 commit 5d43029
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
6 changes: 4 additions & 2 deletions app/ledger.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const doAction = (action) => {
, ...
}
*/
if (publisherInfo._internal.verboseP) {
if (publisherInfo._internal.debugP) {
console.log('\napplication event: ' + JSON.stringify(underscore.pick(action, [ 'actionType', 'key' ]), null, 2))
}
switch (action.actionType) {
Expand Down Expand Up @@ -902,7 +902,8 @@ var updateLedgerInfo = () => {

if (info) {
underscore.extend(ledgerInfo,
underscore.pick(info, [ 'address', 'balance', 'unconfirmed', 'satoshis', 'btc', 'amount', 'currency' ]))
underscore.pick(info, [ 'address', 'passphrase', 'balance', 'unconfirmed', 'satoshis', 'btc', 'amount',
'currency' ]))
if ((!info.buyURLExpires) || (info.buyURLExpires > now)) ledgerInfo.buyURL = info.buyURL
underscore.extend(ledgerInfo, ledgerInfo._internal.cache || {})
}
Expand Down Expand Up @@ -1240,6 +1241,7 @@ var getPaymentInfo = () => {

info = underscore.extend(info, underscore.pick(body, [ 'buyURL', 'buyURLExpires', 'balance', 'unconfirmed', 'satoshis' ]))
info.address = client.getWalletAddress()
info.passphrase = client.getWalletPassphrase()
if ((amount) && (currency)) {
info = underscore.extend(info, { amount: amount, currency: currency })
if ((body.rates) && (body.rates[currency])) {
Expand Down
1 change: 1 addition & 0 deletions docs/state.md
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ WindowStore
}
} ],
address: string, // the BTC wallet address (in base58)
passphrase: string, // the BTC wallet passphrase
balance: string, // confirmed balance in BTC.toFixed(4)
unconfirmed: string, // unconfirmed balance in BTC.toFixed(4)
satoshis: number, // confirmed balance as an integer number of satoshis
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@
"keytar": "^3.0.0",
"l20n": "^3.5.1",
"ledger-balance": "^0.8.60",
"ledger-client": "^0.8.78",
"ledger-geoip": "^0.8.71",
"ledger-publisher": "^0.8.69",
"ledger-client": "^0.8.81",
"ledger-geoip": "^0.8.72",
"ledger-publisher": "^0.8.74",
"lru_cache": "^1.0.0",
"qr-image": "^3.1.0",
"random-lib": "2.1.0",
Expand Down

0 comments on commit 5d43029

Please sign in to comment.