Skip to content

Commit 53d16e1

Browse files
committed
fix(wallet): use map_keychain in Wallet::build_fee_bump
Previously we failed to remove the change output if the wallet has no internal keychain which caused tx building to fail at the new higher feerate. Fix this by mapping the internal keychain to the de-facto change keychain so that the drain output can be recalculated.
1 parent 43f0f8d commit 53d16e1

File tree

1 file changed

+1
-1
lines changed
  • crates/wallet/src/wallet

1 file changed

+1
-1
lines changed

crates/wallet/src/wallet/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1676,7 +1676,7 @@ impl Wallet {
16761676
if tx.output.len() > 1 {
16771677
let mut change_index = None;
16781678
for (index, txout) in tx.output.iter().enumerate() {
1679-
let change_keychain = KeychainKind::Internal;
1679+
let change_keychain = self.map_keychain(KeychainKind::Internal);
16801680
match txout_index.index_of_spk(txout.script_pubkey.clone()) {
16811681
Some((keychain, _)) if *keychain == change_keychain => {
16821682
change_index = Some(index)

0 commit comments

Comments
 (0)