jackmallers
7 years ago
committed by
GitHub
8 changed files with 52 additions and 9 deletions
@ -1,5 +1,7 @@ |
|||||
import subscribeToTransactions from './transactions' |
import subscribeToTransactions from './transactions' |
||||
|
import subscribeToInvoices from './invoices' |
||||
|
|
||||
export default (mainWindow, lnd) => { |
export default (mainWindow, lnd) => { |
||||
subscribeToTransactions(mainWindow, lnd) |
subscribeToTransactions(mainWindow, lnd) |
||||
|
subscribeToInvoices(mainWindow, lnd) |
||||
} |
} |
@ -0,0 +1,10 @@ |
|||||
|
/* eslint-disable */ |
||||
|
|
||||
|
export default function subscribeToInvoices(mainWindow, lnd) { |
||||
|
const call = lnd.subscribeInvoices({}) |
||||
|
|
||||
|
call.on('data', invoice => mainWindow.send('invoiceUpdate', { invoice })) |
||||
|
call.on('end', () => console.log('end')) |
||||
|
call.on('error', error => console.log('error: ', error)) |
||||
|
call.on('status', status => console.log('status: ', status)) |
||||
|
} |
Loading…
Reference in new issue