Fix Bitcoin not sending on Ledger (#1539)

This commit is contained in:
Konstantin Ullrich 2024-07-19 19:31:11 +02:00 committed by GitHub
parent 01d40c4dc3
commit d6c5b84188
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -519,17 +519,20 @@ abstract class ElectrumWalletBase
);
spendsSilentPayment = true;
isSilentPayment = true;
} else {
} else if (!isHardwareWallet) {
privkey =
generateECPrivate(hd: hd, index: utx.bitcoinAddressRecord.index, network: network);
}
vinOutpoints.add(Outpoint(txid: utx.hash, index: utx.vout));
inputPrivKeyInfos.add(ECPrivateInfo(
privkey,
address.type == SegwitAddresType.p2tr,
tweak: !isSilentPayment,
));
if (privkey != null) {
inputPrivKeyInfos.add(ECPrivateInfo(
privkey,
address.type == SegwitAddresType.p2tr,
tweak: !isSilentPayment,
));
}
utxos.add(
UtxoWithAddress(
@ -541,7 +544,7 @@ abstract class ElectrumWalletBase
isSilentPayment: isSilentPayment,
),
ownerDetails: UtxoAddressDetails(
publicKey: privkey.getPublic().toHex(),
publicKey: pubKeyHex,
address: address,
),
),