From f5959d2719ff526ddfd1815ce6bbd0fa15748f2b Mon Sep 17 00:00:00 2001 From: juligasa <11684004+juligasa@users.noreply.github.com> Date: Wed, 4 Oct 2023 13:39:38 +0200 Subject: [PATCH] fix(app): mainnet in production builds --- frontend/apps/desktop/src/daemon.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/apps/desktop/src/daemon.ts b/frontend/apps/desktop/src/daemon.ts index b87c7148c6..c580745348 100644 --- a/frontend/apps/desktop/src/daemon.ts +++ b/frontend/apps/desktop/src/daemon.ts @@ -47,6 +47,11 @@ let goDaemonExecutablePath = ? devDaemonBinaryPath : prodDaemonBinaryPath +let lndhubFlags = + process.env.NODE_ENV == 'development' + ? '-lndhub.mainnet=false' + : '-lndhub.mainnet=true' + console.log(`== ~ goDaemonExecutablePath:`, goDaemonExecutablePath) const daemonArguments = [ @@ -61,6 +66,8 @@ const daemonArguments = [ '-data-dir', userDataDir, + + lndhubFlags, ] logger.info('Launching daemon:', goDaemonExecutablePath, daemonArguments) const daemonProcess = spawn(goDaemonExecutablePath, daemonArguments, {