Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
refactor: remove unused sendPayment events
Browse files Browse the repository at this point in the history
  • Loading branch information
mrfelton committed Nov 8, 2019
1 parent a0488d1 commit e55c00f
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions services/grpc/lightning.methods.js
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,6 @@ async function sendPayment(payload = {}) {
const isSuccess = !res.payment_error
if (isSuccess) {
grpcLog.debug('PAYMENT SUCCESS', res)
this.emit('sendPayment.data', res)
resolve(res)
}

Expand All @@ -302,20 +301,17 @@ async function sendPayment(payload = {}) {
grpcLog.error('PAYMENT ERROR', res)
const error = new Error(res.payment_error)
error.details = res
this.emit('sendPayment.error', error)
reject(error)
}
call.end()
})

call.on('status', status => {
grpcLog.debug('PAYMENT STATUS', status)
this.emit('sendPayment.status', status)
})

call.on('end', () => {
grpcLog.debug('PAYMENT END')
this.emit('sendPayment.end')
})

call.write(payload)
Expand Down

0 comments on commit e55c00f

Please sign in to comment.