Skip to content
Permalink
Browse files

fix(lnd): subscriptions to Lightning service

  • Loading branch information...
korhaliv committed Apr 25, 2019
1 parent 01ad221 commit 3c139803b4ba18e51b0a64a92b3f8029ee8b172e
Showing with 6 additions and 6 deletions.
  1. +6 −6 renderer/reducers/lnd.js
@@ -67,9 +67,9 @@ export const connectGrpcService = () => async dispatch => {

try {
// Hook up event listeners for stream subscriptions.
grpc.on('subscribeInvoices.data', handleInvoiceSubscription)
grpc.on('subscribeTransactions.data', handleTransactionSubscription)
grpc.on('subscribeChannelGraph.data', handleChannelGraphSubscription)
grpc.services.Lightning.on('subscribeInvoices.data', handleInvoiceSubscription)
grpc.services.Lightning.on('subscribeTransactions.data', handleTransactionSubscription)
grpc.services.Lightning.on('subscribeChannelGraph.data', handleChannelGraphSubscription)

// Hook up event listeners to notify when each gRPC service becomes available.
grpc.on('GRPC_WALLET_UNLOCKER_SERVICE_ACTIVE', handleWalletUnlockerActive)
@@ -82,9 +82,9 @@ export const connectGrpcService = () => async dispatch => {
dispatch({ type: CONNECT_GRPC_FAILURE, error })

// Disconnect event listeners.
grpc.off('subscribeInvoices.data', handleInvoiceSubscription)
grpc.off('subscribeTransactions.data', handleTransactionSubscription)
grpc.off('subscribeChannelGraph.data', handleChannelGraphSubscription)
grpc.services.Lightning.off('subscribeInvoices.data', handleInvoiceSubscription)
grpc.services.Lightning.off('subscribeTransactions.data', handleTransactionSubscription)
grpc.services.Lightning.off('subscribeChannelGraph.data', handleChannelGraphSubscription)
grpc.off('GRPC_WALLET_UNLOCKER_SERVICE_ACTIVE', handleWalletUnlockerActive)
grpc.off('GRPC_LIGHTNING_SERVICE_ACTIVE', handleLightningActive)

0 comments on commit 3c13980

Please sign in to comment.
You can’t perform that action at this time.