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 Sep 12, 2023
1 parent 5a05e11 commit 30b5126
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 @@ -2213,7 +2213,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 30b5126

Please sign in to comment.