From 062edc1035b1841948e43d827b2470dc9c4cb84e Mon Sep 17 00:00:00 2001 From: Matthew Fosse Date: Tue, 29 Apr 2025 19:19:20 -0700 Subject: [PATCH] fix spending when mweb is disabled --- cw_bitcoin/lib/litecoin_wallet.dart | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/cw_bitcoin/lib/litecoin_wallet.dart b/cw_bitcoin/lib/litecoin_wallet.dart index bf14b3f55..804019aa7 100644 --- a/cw_bitcoin/lib/litecoin_wallet.dart +++ b/cw_bitcoin/lib/litecoin_wallet.dart @@ -1062,8 +1062,14 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { try { var creds; if (!mwebEnabled) { - creds = (credentials as BitcoinTransactionCredentials); - creds.coinTypeToSpendFrom = UnspentCoinType.nonMweb; + BitcoinTransactionCredentials btcCreds = (credentials as BitcoinTransactionCredentials); + // sets unspent coin type to nonMweb: + creds = BitcoinTransactionCredentials( + btcCreds.outputs, + priority: btcCreds.priority, + feeRate: btcCreds.feeRate, + coinTypeToSpendFrom: UnspentCoinType.nonMweb, + ); } else { creds = credentials; }