You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
588 B
16 lines
588 B
export default function pushclosechannel(lnd, event, payload) {
|
|
return new Promise((resolve, reject) => {
|
|
try {
|
|
const call = lnd.closeChannel(payload)
|
|
|
|
call.on('data', data => event.sender.send('pushclosechannelupdated', { data }))
|
|
call.on('end', () => event.sender.send('pushclosechannelend'))
|
|
call.on('error', error => event.sender.send('pushclosechannelerror', { error }))
|
|
call.on('status', status => event.sender.send('pushclosechannelstatus', { status }))
|
|
|
|
resolve(null, payload)
|
|
} catch (error) {
|
|
reject(error, null)
|
|
}
|
|
})
|
|
}
|
|
|