From e52079a2fa506ffe2a1a91d8aff86785e6e7b15b Mon Sep 17 00:00:00 2001 From: Alexey Padalko Date: Mon, 7 Oct 2019 16:19:27 +0300 Subject: [PATCH] refactor(grpc): remove unused event emits --- services/grpc/lightning.methods.js | 8 -------- 1 file changed, 8 deletions(-) diff --git a/services/grpc/lightning.methods.js b/services/grpc/lightning.methods.js index 4f99e71aae0..0fb354cc5eb 100644 --- a/services/grpc/lightning.methods.js +++ b/services/grpc/lightning.methods.js @@ -175,7 +175,6 @@ async function openChannel(payload = {}) { call.on('data', data => { grpcLog.debug('OPEN_CHANNEL DATA', data) const response = { ...parsePayload(payload), data } - this.emit('openChannel.data', response) resolve(response) }) @@ -183,18 +182,15 @@ async function openChannel(payload = {}) { grpcLog.error('OPEN_CHANNEL ERROR', data) const error = new Error(data.message) error.payload = parsePayload(payload) - this.emit('openChannel.error', error) reject(error) }) call.on('status', status => { grpcLog.debug('OPEN_CHANNEL STATUS', status) - this.emit('openChannel.status', status) }) call.on('end', () => { grpcLog.debug('OPEN_CHANNEL END') - this.emit('openChannel.end') }) } catch (e) { const error = new Error(e.message) @@ -235,7 +231,6 @@ async function closeChannel(payload = {}) { call.on('data', data => { grpcLog.debug('CLOSE_CHANNEL DATA', data) const response = { data, chan_id } - this.emit('closeChannel.data', response) resolve(response) }) @@ -243,18 +238,15 @@ async function closeChannel(payload = {}) { grpcLog.error('CLOSE_CHANNEL ERROR', data) const error = new Error(data.message) error.payload = { chan_id } - this.emit('closeChannel.error', error) reject(error) }) call.on('status', status => { grpcLog.debug('CLOSE_CHANNEL STATUS', status) - this.emit('closeChannel.status', status) }) call.on('end', () => { grpcLog.debug('CLOSE_CHANNEL END') - this.emit('closeChannel.end') }) } catch (e) { const error = new Error(e.message)