From d2f0a97764f921ca1c65abd86509e77595cd16b2 Mon Sep 17 00:00:00 2001 From: OmarHatem Date: Thu, 26 Jun 2025 09:22:15 +0300 Subject: [PATCH] apply some changes from SP Fix pr --- cw_bitcoin/lib/address_from_output.dart | 21 ++++------ cw_bitcoin/lib/bitcoin_address_record.dart | 2 +- .../lib/bitcoin_receive_page_option.dart | 16 ++++---- cw_bitcoin/lib/bitcoin_wallet.dart | 2 +- cw_bitcoin/lib/bitcoin_wallet_addresses.dart | 4 +- cw_bitcoin/lib/electrum_wallet.dart | 39 +++++++++--------- cw_bitcoin/lib/electrum_wallet_addresses.dart | 40 +++++++++---------- cw_bitcoin/lib/electrum_wallet_snapshot.dart | 8 ++-- cw_bitcoin/lib/litecoin_wallet.dart | 13 +----- cw_bitcoin/lib/psbt/signer.dart | 16 ++++---- cw_bitcoin/lib/psbt/transaction_builder.dart | 4 +- cw_bitcoin/pubspec.lock | 21 +++++++--- cw_bitcoin/pubspec.yaml | 6 ++- cw_bitcoin_cash/pubspec.yaml | 4 +- pubspec_base.yaml | 4 +- 15 files changed, 99 insertions(+), 101 deletions(-) diff --git a/cw_bitcoin/lib/address_from_output.dart b/cw_bitcoin/lib/address_from_output.dart index 0d985b237..d6e931068 100644 --- a/cw_bitcoin/lib/address_from_output.dart +++ b/cw_bitcoin/lib/address_from_output.dart @@ -17,21 +17,16 @@ BitcoinBaseAddress addressFromScript(Script script, switch (addressType) { case P2pkhAddressType.p2pkh: - return P2pkhAddress.fromScriptPubkey( - script: script, network: BitcoinNetwork.mainnet); + return P2pkhAddress.fromScriptPubkey(script: script); case P2shAddressType.p2pkhInP2sh: case P2shAddressType.p2pkInP2sh: - return P2shAddress.fromScriptPubkey( - script: script, network: BitcoinNetwork.mainnet); - case SegwitAddresType.p2wpkh: - return P2wpkhAddress.fromScriptPubkey( - script: script, network: BitcoinNetwork.mainnet); - case SegwitAddresType.p2wsh: - return P2wshAddress.fromScriptPubkey( - script: script, network: BitcoinNetwork.mainnet); - case SegwitAddresType.p2tr: - return P2trAddress.fromScriptPubkey( - script: script, network: BitcoinNetwork.mainnet); + return P2shAddress.fromScriptPubkey(script: script); + case SegwitAddressType.p2wpkh: + return P2wpkhAddress.fromScriptPubkey(script: script); + case SegwitAddressType.p2wsh: + return P2wshAddress.fromScriptPubkey(script: script); + case SegwitAddressType.p2tr: + return P2trAddress.fromScriptPubkey(script: script); } throw ArgumentError("Invalid script"); diff --git a/cw_bitcoin/lib/bitcoin_address_record.dart b/cw_bitcoin/lib/bitcoin_address_record.dart index 1509f913a..97b3c08f8 100644 --- a/cw_bitcoin/lib/bitcoin_address_record.dart +++ b/cw_bitcoin/lib/bitcoin_address_record.dart @@ -82,7 +82,7 @@ class BitcoinAddressRecord extends BaseBitcoinAddressRecord { type: decoded['type'] != null && decoded['type'] != '' ? BitcoinAddressType.values .firstWhere((type) => type.toString() == decoded['type'] as String) - : SegwitAddresType.p2wpkh, + : SegwitAddressType.p2wpkh, scriptHash: decoded['scriptHash'] as String?, network: network, ); diff --git a/cw_bitcoin/lib/bitcoin_receive_page_option.dart b/cw_bitcoin/lib/bitcoin_receive_page_option.dart index 07083e111..8331a182d 100644 --- a/cw_bitcoin/lib/bitcoin_receive_page_option.dart +++ b/cw_bitcoin/lib/bitcoin_receive_page_option.dart @@ -36,9 +36,9 @@ class BitcoinReceivePageOption implements ReceivePageOption { BitcoinAddressType toType() { switch (this) { case BitcoinReceivePageOption.p2tr: - return SegwitAddresType.p2tr; + return SegwitAddressType.p2tr; case BitcoinReceivePageOption.p2wsh: - return SegwitAddresType.p2wsh; + return SegwitAddressType.p2wsh; case BitcoinReceivePageOption.p2pkh: return P2pkhAddressType.p2pkh; case BitcoinReceivePageOption.p2sh: @@ -46,20 +46,20 @@ class BitcoinReceivePageOption implements ReceivePageOption { case BitcoinReceivePageOption.silent_payments: return SilentPaymentsAddresType.p2sp; case BitcoinReceivePageOption.mweb: - return SegwitAddresType.mweb; + return SegwitAddressType.mweb; case BitcoinReceivePageOption.p2wpkh: default: - return SegwitAddresType.p2wpkh; + return SegwitAddressType.p2wpkh; } } factory BitcoinReceivePageOption.fromType(BitcoinAddressType type) { switch (type) { - case SegwitAddresType.p2tr: + case SegwitAddressType.p2tr: return BitcoinReceivePageOption.p2tr; - case SegwitAddresType.p2wsh: + case SegwitAddressType.p2wsh: return BitcoinReceivePageOption.p2wsh; - case SegwitAddresType.mweb: + case SegwitAddressType.mweb: return BitcoinReceivePageOption.mweb; case P2pkhAddressType.p2pkh: return BitcoinReceivePageOption.p2pkh; @@ -67,7 +67,7 @@ class BitcoinReceivePageOption implements ReceivePageOption { return BitcoinReceivePageOption.p2sh; case SilentPaymentsAddresType.p2sp: return BitcoinReceivePageOption.silent_payments; - case SegwitAddresType.p2wpkh: + case SegwitAddressType.p2wpkh: default: return BitcoinReceivePageOption.p2wpkh; } diff --git a/cw_bitcoin/lib/bitcoin_wallet.dart b/cw_bitcoin/lib/bitcoin_wallet.dart index 9231022f6..7371d38f2 100644 --- a/cw_bitcoin/lib/bitcoin_wallet.dart +++ b/cw_bitcoin/lib/bitcoin_wallet.dart @@ -413,7 +413,7 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store { final psbt = PsbtV2()..deserializeV0(base64Decode(preProcessedPsbt)); await psbt.signWithUTXO(utxos, (txDigest, utxo, key, sighash) { - return utxo.utxo.isP2tr() + return utxo.utxo.isP2tr ? key.signTapRoot( txDigest, sighash: sighash, diff --git a/cw_bitcoin/lib/bitcoin_wallet_addresses.dart b/cw_bitcoin/lib/bitcoin_wallet_addresses.dart index b33d722ab..0f18c9357 100644 --- a/cw_bitcoin/lib/bitcoin_wallet_addresses.dart +++ b/cw_bitcoin/lib/bitcoin_wallet_addresses.dart @@ -45,10 +45,10 @@ abstract class BitcoinWalletAddressesBase extends ElectrumWalletAddresses with S if (addressType == P2pkhAddressType.p2pkh) return generateP2PKHAddress(hd: hd, index: index, network: network); - if (addressType == SegwitAddresType.p2tr) + if (addressType == SegwitAddressType.p2tr) return generateP2TRAddress(hd: hd, index: index, network: network); - if (addressType == SegwitAddresType.p2wsh) + if (addressType == SegwitAddressType.p2wsh) return generateP2WSHAddress(hd: hd, index: index, network: network); if (addressType == P2shAddressType.p2wpkhInP2sh) diff --git a/cw_bitcoin/lib/electrum_wallet.dart b/cw_bitcoin/lib/electrum_wallet.dart index bb9cea1bc..58dd166f7 100644 --- a/cw_bitcoin/lib/electrum_wallet.dart +++ b/cw_bitcoin/lib/electrum_wallet.dart @@ -182,7 +182,7 @@ abstract class ElectrumWalletBase SyncStatus syncStatus; Set get addressesSet => walletAddresses.allAddresses - .where((element) => element.type != SegwitAddresType.mweb) + .where((element) => element.type != SegwitAddressType.mweb) .map((addr) => addr.address) .toSet(); @@ -439,7 +439,6 @@ abstract class ElectrumWalletBase BigintUtils.fromBytes(BytesUtils.fromHexString(unspent.silentPaymentLabel!)), ) : silentAddress.B_spend, - network: network, ); final addressRecord = walletAddresses.silentAddresses @@ -624,9 +623,9 @@ abstract class ElectrumWalletBase switch (coinTypeToSpendFrom) { case UnspentCoinType.mweb: - return utx.bitcoinAddressRecord.type == SegwitAddresType.mweb; + return utx.bitcoinAddressRecord.type == SegwitAddressType.mweb; case UnspentCoinType.nonMweb: - return utx.bitcoinAddressRecord.type != SegwitAddresType.mweb; + return utx.bitcoinAddressRecord.type != SegwitAddressType.mweb; case UnspentCoinType.any: return true; } @@ -634,7 +633,7 @@ abstract class ElectrumWalletBase final unconfirmedCoins = availableInputs.where((utx) => utx.confirmations == 0).toList(); // sort the unconfirmed coins so that mweb coins are last: - availableInputs.sort((a, b) => a.bitcoinAddressRecord.type == SegwitAddresType.mweb ? 1 : -1); + availableInputs.sort((a, b) => a.bitcoinAddressRecord.type == SegwitAddressType.mweb ? 1 : -1); for (int i = 0; i < availableInputs.length; i++) { final utx = availableInputs[i]; @@ -642,7 +641,7 @@ abstract class ElectrumWalletBase if (paysToSilentPayment) { // Check inputs for shared secret derivation - if (utx.bitcoinAddressRecord.type == SegwitAddresType.p2wsh) { + if (utx.bitcoinAddressRecord.type == SegwitAddressType.p2wsh) { throw BitcoinTransactionSilentPaymentsNotSupported(); } } @@ -677,7 +676,7 @@ abstract class ElectrumWalletBase if (privkey != null) { inputPrivKeyInfos.add(ECPrivateInfo( privkey, - address.type == SegwitAddresType.p2tr, + address.type == SegwitAddressType.p2tr, tweak: !isSilentPayment, )); @@ -1163,7 +1162,7 @@ abstract class ElectrumWalletBase throw Exception(error); } - if (utxo.utxo.isP2tr()) { + if (utxo.utxo.isP2tr) { hasTaprootInputs = true; return key.privkey.signTapRoot( txDigest, @@ -1230,7 +1229,7 @@ abstract class ElectrumWalletBase 'change_address_index': walletAddresses.currentChangeAddressIndexByType, 'addresses': walletAddresses.allAddresses.map((addr) => addr.toJSON()).toList(), 'address_page_type': walletInfo.addressPageType == null - ? SegwitAddresType.p2wpkh.toString() + ? SegwitAddressType.p2wpkh.toString() : walletInfo.addressPageType.toString(), 'balance': balance[currency]?.toJSON(), 'derivationTypeIndex': walletInfo.derivationInfo?.derivationType?.index, @@ -1370,7 +1369,7 @@ abstract class ElectrumWalletBase List updatedUnspentCoins = []; final previousUnspentCoins = List.from(unspentCoins.where((utxo) => - utxo.bitcoinAddressRecord.type != SegwitAddresType.mweb && + utxo.bitcoinAddressRecord.type != SegwitAddressType.mweb && utxo.bitcoinAddressRecord is! BitcoinSilentPaymentAddressRecord)); if (hasSilentPaymentsScanning) { @@ -1384,13 +1383,13 @@ abstract class ElectrumWalletBase // Set the balance of all non-silent payment and non-mweb addresses to 0 before updating walletAddresses.allAddresses - .where((element) => element.type != SegwitAddresType.mweb) + .where((element) => element.type != SegwitAddressType.mweb) .forEach((addr) { if (addr is! BitcoinSilentPaymentAddressRecord) addr.balance = 0; }); final addressFutures = walletAddresses.allAddresses - .where((element) => element.type != SegwitAddresType.mweb) + .where((element) => element.type != SegwitAddressType.mweb) .map((address) => fetchUnspent(address)) .toList(); @@ -1831,7 +1830,7 @@ abstract class ElectrumWalletBase throw Exception("Cannot find private key"); } - if (utxo.utxo.isP2tr()) { + if (utxo.utxo.isP2tr) { return key.signTapRoot(txDigest, sighash: sighash); } else { return key.signInput(txDigest, sigHash: sighash); @@ -1978,7 +1977,7 @@ abstract class ElectrumWalletBase .map((type) => fetchTransactionsForAddressType(historiesWithDetails, type))); } else if (type == WalletType.litecoin) { await Future.wait(LITECOIN_ADDRESS_TYPES - .where((type) => type != SegwitAddresType.mweb) + .where((type) => type != SegwitAddressType.mweb) .map((type) => fetchTransactionsForAddressType(historiesWithDetails, type))); } @@ -2167,7 +2166,7 @@ abstract class ElectrumWalletBase final unsubscribedScriptHashes = walletAddresses.allAddresses.where( (address) => !_scripthashesUpdateSubject.containsKey(address.getScriptHash(network)) && - address.type != SegwitAddresType.mweb, + address.type != SegwitAddressType.mweb, ); await Future.wait(unsubscribedScriptHashes.map((address) async { @@ -2707,7 +2706,7 @@ Future startRefresh(ScanData scanData) async { isUsed: true, network: scanData.network, silentPaymentTweak: t_k, - type: SegwitAddresType.p2tr, + type: SegwitAddressType.p2tr, txCount: 1, balance: amount!, ); @@ -2800,15 +2799,15 @@ BitcoinAddressType _getScriptType(BitcoinBaseAddress type) { } else if (type is P2shAddress) { return P2shAddressType.p2wpkhInP2sh; } else if (type is P2wshAddress) { - return SegwitAddresType.p2wsh; + return SegwitAddressType.p2wsh; } else if (type is P2trAddress) { - return SegwitAddresType.p2tr; + return SegwitAddressType.p2tr; } else if (type is MwebAddress) { - return SegwitAddresType.mweb; + return SegwitAddressType.mweb; } else if (type is SilentPaymentsAddresType) { return SilentPaymentsAddresType.p2sp; } else { - return SegwitAddresType.p2wpkh; + return SegwitAddressType.p2wpkh; } } diff --git a/cw_bitcoin/lib/electrum_wallet_addresses.dart b/cw_bitcoin/lib/electrum_wallet_addresses.dart index 614a06a3b..f8c0b9689 100644 --- a/cw_bitcoin/lib/electrum_wallet_addresses.dart +++ b/cw_bitcoin/lib/electrum_wallet_addresses.dart @@ -17,16 +17,16 @@ part 'electrum_wallet_addresses.g.dart'; class ElectrumWalletAddresses = ElectrumWalletAddressesBase with _$ElectrumWalletAddresses; const List BITCOIN_ADDRESS_TYPES = [ - SegwitAddresType.p2wpkh, + SegwitAddressType.p2wpkh, P2pkhAddressType.p2pkh, - SegwitAddresType.p2tr, - SegwitAddresType.p2wsh, + SegwitAddressType.p2tr, + SegwitAddressType.p2wsh, P2shAddressType.p2wpkhInP2sh, ]; const List LITECOIN_ADDRESS_TYPES = [ - SegwitAddresType.p2wpkh, - SegwitAddresType.mweb, + SegwitAddressType.p2wpkh, + SegwitAddressType.mweb, ]; const List BITCOIN_CASH_ADDRESS_TYPES = [ @@ -62,7 +62,7 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store { _addressPageType = initialAddressPageType ?? (walletInfo.addressPageType != null ? BitcoinAddressType.fromValue(walletInfo.addressPageType!) - : SegwitAddresType.p2wpkh), + : SegwitAddressType.p2wpkh), silentAddresses = ObservableList.of( (initialSilentAddresses ?? []).toSet()), currentSilentAddressIndex = initialSilentAddressIndex, @@ -249,17 +249,17 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store { if (walletInfo.type == WalletType.bitcoinCash) { await _generateInitialAddresses(type: P2pkhAddressType.p2pkh); } else if (walletInfo.type == WalletType.litecoin) { - await _generateInitialAddresses(type: SegwitAddresType.p2wpkh); + await _generateInitialAddresses(type: SegwitAddressType.p2wpkh); if ((Platform.isAndroid || Platform.isIOS) && !isHardwareWallet) { - await _generateInitialAddresses(type: SegwitAddresType.mweb); + await _generateInitialAddresses(type: SegwitAddressType.mweb); } } else if (walletInfo.type == WalletType.bitcoin) { await _generateInitialAddresses(); if (!isHardwareWallet) { await _generateInitialAddresses(type: P2pkhAddressType.p2pkh); await _generateInitialAddresses(type: P2shAddressType.p2wpkhInP2sh); - await _generateInitialAddresses(type: SegwitAddresType.p2tr); - await _generateInitialAddresses(type: SegwitAddresType.p2wsh); + await _generateInitialAddresses(type: SegwitAddressType.p2tr); + await _generateInitialAddresses(type: SegwitAddressType.p2wsh); } } @@ -323,7 +323,7 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store { BaseBitcoinAddressRecord generateNewAddress({String label = ''}) { if (addressPageType == SilentPaymentsAddresType.p2sp && silentAddress != null) { final currentSilentAddressIndex = silentAddresses - .where((addressRecord) => addressRecord.type != SegwitAddresType.p2tr) + .where((addressRecord) => addressRecord.type != SegwitAddressType.p2tr) .length - 1; @@ -381,7 +381,7 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store { void addBitcoinAddressTypes() { final lastP2wpkh = _addresses .where((addressRecord) => - _isUnusedReceiveAddressByType(addressRecord, SegwitAddresType.p2wpkh)) + _isUnusedReceiveAddressByType(addressRecord, SegwitAddressType.p2wpkh)) .toList() .last; if (lastP2wpkh.address != address) { @@ -407,7 +407,7 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store { } final lastP2tr = _addresses.firstWhere( - (addressRecord) => _isUnusedReceiveAddressByType(addressRecord, SegwitAddresType.p2tr)); + (addressRecord) => _isUnusedReceiveAddressByType(addressRecord, SegwitAddressType.p2tr)); if (lastP2tr.address != address) { addressesMap[lastP2tr.address] = 'P2TR'; } else { @@ -415,7 +415,7 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store { } final lastP2wsh = _addresses.firstWhere( - (addressRecord) => _isUnusedReceiveAddressByType(addressRecord, SegwitAddresType.p2wsh)); + (addressRecord) => _isUnusedReceiveAddressByType(addressRecord, SegwitAddressType.p2wsh)); if (lastP2wsh.address != address) { addressesMap[lastP2wsh.address] = 'P2WSH'; } else { @@ -440,7 +440,7 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store { void addLitecoinAddressTypes() { final lastP2wpkh = _addresses .where((addressRecord) => - _isUnusedReceiveAddressByType(addressRecord, SegwitAddresType.p2wpkh)) + _isUnusedReceiveAddressByType(addressRecord, SegwitAddressType.p2wpkh)) .toList() .last; if (lastP2wpkh.address != address) { @@ -450,7 +450,7 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store { } final lastMweb = _addresses.firstWhere( - (addressRecord) => _isUnusedReceiveAddressByType(addressRecord, SegwitAddresType.mweb)); + (addressRecord) => _isUnusedReceiveAddressByType(addressRecord, SegwitAddressType.mweb)); if (lastMweb.address != address) { addressesMap[lastMweb.address] = 'MWEB'; } else { @@ -560,14 +560,14 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store { addressRecord.isHidden && !addressRecord.isUsed && // TODO: feature to change change address type. For now fixed to p2wpkh, the cheapest type - (walletInfo.type != WalletType.bitcoin || addressRecord.type == SegwitAddresType.p2wpkh)); + (walletInfo.type != WalletType.bitcoin || addressRecord.type == SegwitAddressType.p2wpkh)); changeAddresses.addAll(newAddresses); } @action Future discoverAddresses(List addressList, bool isHidden, Future Function(BitcoinAddressRecord) getAddressHistory, - {BitcoinAddressType type = SegwitAddresType.p2wpkh}) async { + {BitcoinAddressType type = SegwitAddressType.p2wpkh}) async { final newAddresses = await _createNewAddresses(gap, startIndex: addressList.length, isHidden: isHidden, type: type); addAddresses(newAddresses); @@ -581,7 +581,7 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store { } Future _generateInitialAddresses( - {BitcoinAddressType type = SegwitAddresType.p2wpkh}) async { + {BitcoinAddressType type = SegwitAddressType.p2wpkh}) async { var countOfReceiveAddresses = 0; var countOfHiddenAddresses = 0; @@ -658,7 +658,7 @@ abstract class ElectrumWalletAddressesBase extends WalletAddresses with Store { void _validateAddresses() { _addresses.forEach((element) async { - if (element.type == SegwitAddresType.mweb) { + if (element.type == SegwitAddressType.mweb) { // this would add a ton of startup lag for mweb addresses since we have 1000 of them return; } diff --git a/cw_bitcoin/lib/electrum_wallet_snapshot.dart b/cw_bitcoin/lib/electrum_wallet_snapshot.dart index 990719089..3e5f331df 100644 --- a/cw_bitcoin/lib/electrum_wallet_snapshot.dart +++ b/cw_bitcoin/lib/electrum_wallet_snapshot.dart @@ -87,8 +87,8 @@ class ElectrumWalletSnapshot { final balance = ElectrumBalance.fromJSON(data['balance'] as String?) ?? ElectrumBalance(confirmed: 0, unconfirmed: 0, frozen: 0); - var regularAddressIndexByType = {SegwitAddresType.p2wpkh.toString(): 0}; - var changeAddressIndexByType = {SegwitAddresType.p2wpkh.toString(): 0}; + var regularAddressIndexByType = {SegwitAddressType.p2wpkh.toString(): 0}; + var changeAddressIndexByType = {SegwitAddressType.p2wpkh.toString(): 0}; var silentAddressIndex = 0; final derivationType = DerivationType @@ -97,10 +97,10 @@ class ElectrumWalletSnapshot { try { regularAddressIndexByType = { - SegwitAddresType.p2wpkh.toString(): int.parse(data['account_index'] as String? ?? '0') + SegwitAddressType.p2wpkh.toString(): int.parse(data['account_index'] as String? ?? '0') }; changeAddressIndexByType = { - SegwitAddresType.p2wpkh.toString(): + SegwitAddressType.p2wpkh.toString(): int.parse(data['change_address_index'] as String? ?? '0') }; silentAddressIndex = int.parse(data['silent_address_index'] as String? ?? '0'); diff --git a/cw_bitcoin/lib/litecoin_wallet.dart b/cw_bitcoin/lib/litecoin_wallet.dart index f87383dfb..99fc86baa 100644 --- a/cw_bitcoin/lib/litecoin_wallet.dart +++ b/cw_bitcoin/lib/litecoin_wallet.dart @@ -50,7 +50,7 @@ import 'package:ledger_litecoin/ledger_litecoin.dart'; import 'package:mobx/mobx.dart'; import 'package:cw_core/wallet_type.dart'; import 'package:cw_mweb/cw_mweb.dart'; -import 'package:bitcoin_base/src/crypto/keypair/sign_utils.dart'; +// import 'package:bitcoin_base/src/crypto/keypair/sign_utils.dart'; import 'package:pointycastle/ecc/api.dart'; import 'package:pointycastle/ecc/curves/secp256k1.dart'; import 'package:shared_preferences/shared_preferences.dart'; @@ -690,16 +690,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store { throw Exception(error); } - if (utxo.utxo.isP2tr()) { - hasTaprootInputs = true; - return key.privkey.signTapRoot( - txDigest, - sighash: sighash, - tweak: utxo.utxo.isSilentPayment != true, - ); - } else { - return key.privkey.signInput(txDigest, sigHash: sighash); - } + return key.privkey.signInput(txDigest, sigHash: sighash); }); return PendingBitcoinTransaction(transaction, type, diff --git a/cw_bitcoin/lib/psbt/signer.dart b/cw_bitcoin/lib/psbt/signer.dart index 1d0ceba8b..2dcbf8fb0 100644 --- a/cw_bitcoin/lib/psbt/signer.dart +++ b/cw_bitcoin/lib/psbt/signer.dart @@ -51,7 +51,7 @@ extension PsbtSigner on PsbtV2 { List taprootAmounts = []; List