fix spending when mweb is disabled

This commit is contained in:
Matthew Fosse 2025-04-29 19:19:20 -07:00
parent 87ed8ebc12
commit 062edc1035

View file

@ -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;
}