From eb2f8b4766a67feace09fe6d16187fe4543c51b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nelson=20P=C3=A9rez?= Date: Sun, 20 Feb 2022 21:47:29 -0500 Subject: [PATCH] fix: displays correct wallet balance when running on regtest without bitcoin core by introducing the network in config --- class/User.js | 2 +- config.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/class/User.js b/class/User.js index a4f8e867..207d8250 100644 --- a/class/User.js +++ b/class/User.js @@ -442,7 +442,7 @@ export class User { transactions .filter((tx) => tx.label !== 'external' && !tx.label.includes('openchannel')) .map((tx) => { - const decodedTx = decodeRawHex(tx.raw_tx_hex); + const decodedTx = decodeRawHex(tx.raw_tx_hex, config.network); decodedTx.outputs.forEach((vout) => outTxns.push({ // mark all as received, since external is filtered out diff --git a/config.js b/config.js index 840a265a..f5d55d77 100644 --- a/config.js +++ b/config.js @@ -1,4 +1,6 @@ +const bitcoin = require('bitcoinjs-lib') let config = { + network: bitcoin.networks.bitcoin, enableUpdateDescribeGraph: false, postRateLimit: 100, rateLimit: 200,