From d92e3b4999a90d8cda66ba73f011a01b3b5aed8d Mon Sep 17 00:00:00 2001 From: Chi Kei Chan Date: Thu, 6 Jan 2022 02:02:59 -0800 Subject: [PATCH] walletnode: use same prefix as plugin when running own wallet node (#435) --- app/background/wallet/service.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/background/wallet/service.js b/app/background/wallet/service.js index 200a2a583..52788df15 100644 --- a/app/background/wallet/service.js +++ b/app/background/wallet/service.js @@ -156,7 +156,7 @@ class WalletService { }); // This is an unfortunate work-around for the fact that - // WalletNode doesn't accept a `nodePath` option to + // WalletNode doesn't accept a `nodePath` option to // pass to NodeClient which gets passed to bcurl/client. const nodeURL = this.conn.pathname @@ -167,6 +167,8 @@ class WalletService { : null; + const prefix = await nodeService.getDir(); + this.node = new WalletNode({ network: this.networkName, nodeHost: this.conn.host, @@ -176,7 +178,7 @@ class WalletService { nodeURL, apiKey: this.walletApiKey, memory: false, - prefix: HSD_DATA_DIR, + prefix: prefix, logFile: true, logConsole: false, logLevel: 'debug',