try not globally storing lnd and create fresh on include
This commit is contained in:
parent
10b2c85db1
commit
876ac52a95
|
@ -1,12 +1,9 @@
|
|||
import lndService from 'ln-service'
|
||||
|
||||
if (!global.lnd) {
|
||||
const { lnd } = lndService.authenticatedLndGrpc({
|
||||
cert: process.env.LND_CERT,
|
||||
macaroon: process.env.LND_MACAROON,
|
||||
socket: process.env.LND_SOCKET
|
||||
})
|
||||
global.lnd = lnd
|
||||
}
|
||||
const { lnd } = lndService.authenticatedLndGrpc({
|
||||
cert: process.env.LND_CERT,
|
||||
macaroon: process.env.LND_MACAROON,
|
||||
socket: process.env.LND_SOCKET
|
||||
})
|
||||
|
||||
export default global.lnd
|
||||
export default lnd
|
||||
|
|
Loading…
Reference in New Issue