From 1111261ab8b7fba006c1b4ddd9e513fa04b4e5c5 Mon Sep 17 00:00:00 2001 From: Matthew Fosse Date: Thu, 16 Jan 2025 13:35:42 -0800 Subject: [PATCH] quick fix [still investigating] --- cw_bitcoin/lib/litecoin_wallet.dart | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cw_bitcoin/lib/litecoin_wallet.dart b/cw_bitcoin/lib/litecoin_wallet.dart index 79dcbf415e..86cce1fb32 100644 --- a/cw_bitcoin/lib/litecoin_wallet.dart +++ b/cw_bitcoin/lib/litecoin_wallet.dart @@ -982,7 +982,16 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { } if (!mwebEnabled) { - throw Exception("MWEB is not enabled! can't calculate fee without starting the mweb server!"); + // in the unlikely event that we accidentally included mweb inputs or outputs, this transaction will just fail: + return await super.calcFee( + utxos: utxos, + outputs: outputs, + network: network, + memo: memo, + feeRate: feeRate, + inputPrivKeyInfos: inputPrivKeyInfos, + vinOutpoints: vinOutpoints, + ); } if (outputs.length == 1 && outputs[0].toOutput.amount == BigInt.zero) {