Browse Source

feat(lnd): update lnd to latest master build

renovate/lint-staged-8.x
Tom Kirkpatrick 6 years ago
parent
commit
b88ebb3f4e
No known key found for this signature in database GPG Key ID: 72203A8EC5967EA8
  1. 23
      app/lib/utils/btc.js
  2. 2
      app/lib/zap/controller.js
  3. 5
      app/reducers/invoice.js
  4. 2
      package.json
  5. 4
      resources/rpc.proto

23
app/lib/utils/btc.js

@ -25,12 +25,12 @@ export function btcToBits(btc) {
export function btcToFiat(btc, price) {
const amount = parseFloat(btc * price).toFixed(2)
return (btc > 0 && amount <= 0) ? '< 0.01' : numberWithCommas(amount)
return btc > 0 && amount <= 0 ? '< 0.01' : numberWithCommas(amount)
}
////////////////////////////
// bits to things /////////
//////////////////////////
//////////////////////////
export function bitsToBtc(bits, price) {
if (bits === undefined || bits === null || bits === '') return null
@ -41,7 +41,7 @@ export function bitsToBtc(bits, price) {
export function bitsToSatoshis(bits, price) {
if (bits === undefined || bits === null || bits === '') return null
return bits * 100
}
@ -54,7 +54,7 @@ export function bitsToFiat(bits, price) {
////////////////////////////
// satoshis to things /////
//////////////////////////
//////////////////////////
export function satoshisToBtc(satoshis) {
if (satoshis === undefined || satoshis === null || satoshis === '') return null
@ -76,17 +76,6 @@ export function satoshisToFiat(satoshis, price) {
return btcToFiat(satoshisToBtc(satoshis), price)
}
////////////////////////////////
// millisatoshis to satoshis //
//////////////////////////////
export function millisatoshisToSatoshis(millisatoshis) {
if (millisatoshis === undefined || millisatoshis === null || millisatoshis === '') return null
return Math.round(millisatoshis / 1000)
}
export function renderCurrency(currency) {
switch (currency) {
case 'btc':
@ -97,7 +86,7 @@ export function renderCurrency(currency) {
return 'satoshis'
default:
return 'satoshis'
}
}
}
export function convert(from, to, amount, price) {
@ -156,8 +145,6 @@ export default {
satoshisToBits,
satoshisToFiat,
millisatoshisToSatoshis,
renderCurrency,
convert

2
app/lib/zap/controller.js

@ -386,7 +386,7 @@ class ZapController {
const shutdownTimeout = setTimeout(() => {
this.neutrino.removeListener('close', closeHandler)
if (this.neutrino) {
mainLog.warn('Graceful shutdown failed to complete within 30 seconds.')
mainLog.warn('Graceful shutdown failed to complete within 10 seconds.')
this.neutrino.kill()
resolve()
}

5
app/reducers/invoice.js

@ -40,10 +40,7 @@ export const UPDATE_INVOICE = 'UPDATE_INVOICE'
// Decorate invoice object with custom/computed properties.
const decorateInvoice = invoice => {
invoice.finalAmount = invoice.value
if (invoice.amt_paid) {
invoice.finalAmount = btc.millisatoshisToSatoshis(invoice.amt_paid)
}
invoice.finalAmount = invoice.amt_paid ? invoice.amt_paid : invoice.value
return invoice
}

2
package.json

@ -42,7 +42,7 @@
"config": {
"style_paths": "app/styles/*.scss app/components/**/*.scss",
"lnd-binary": {
"binaryVersion": "0.4.2-beta-913-g26f68da5",
"binaryVersion": "0.5-beta-rc1-52-gbaee07ef",
"binarySite": "https://github.com/LN-Zap/lnd/releases/download"
}
},

4
resources/rpc.proto

@ -1,4 +1,4 @@
// Imported from https://github.com/lightningnetwork/lnd/blob/26f68da5b2883885fcf6a8e79b3fc9bb12cc9eef/lnrpc/rpc.proto
// Imported from https://github.com/lightningnetwork/lnd/blob/baee07ef480c15a731e0c87dc98d27269c5a80fa/lnrpc/rpc.proto
syntax = "proto3";
// import "google/api/annotations.proto";
@ -23,7 +23,7 @@ package lnrpc;
*
* More information on how exactly the gRPC documentation is generated from
* this proto file can be found here:
* https://github.com/MaxFangX/lightning-api
* https://github.com/lightninglabs/lightning-api
*/
// The WalletUnlocker service is used to set up a wallet password for

Loading…
Cancel
Save