Skip to content

Commit

Permalink
wallet: update TransactionChangeType
Browse files Browse the repository at this point in the history
If sending to a silent payment destination, the change type should be taproot
  • Loading branch information
josibake committed Jan 19, 2024
1 parent 6e98522 commit 9d0d12a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2211,7 +2211,7 @@ OutputType CWallet::TransactionChangeType(const std::optional<OutputType>& chang
bool any_pkh{false};

for (const auto& recipient : vecSend) {
if (std::get_if<WitnessV1Taproot>(&recipient.dest)) {
if (std::get_if<WitnessV1Taproot>(&recipient.dest) || std::get_if<V0SilentPaymentDestination>(&recipient.dest)) {
any_tr = true;
} else if (std::get_if<WitnessV0KeyHash>(&recipient.dest)) {
any_wpkh = true;
Expand Down

0 comments on commit 9d0d12a

Please sign in to comment.