aboutsummaryrefslogtreecommitdiff
path: root/src/qt/paymentserver.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-03-19 16:55:18 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2018-03-19 17:05:35 +0100
commitc39dd2ef59c986576726cc356a27165486fd0d65 (patch)
treec2cd0eadc85324335722dbd25fc897d37197840e /src/qt/paymentserver.cpp
parent6324c68aa017ceb48fe3edfb5a2b141fcf0090fa (diff)
parentfab8a6f609d15863545955d6523c616c2a97eeab (diff)
downloadbitcoin-c39dd2ef59c986576726cc356a27165486fd0d65.tar.xz
Merge #12408: wallet: Change output type globals to members
fab8a6f60 wallet: Change output type globals to members (MarcoFalke) Pull request description: Output type is used by the wallet when generating addresses or transactions with change, thus it should be a member of `CWallet`. Moreover, in light of multiwallet, it makes sense to prepare for per-wallet attributes instead of for-all-wallets globals. Tree-SHA512: 4fa397cd82522e5bacf4870160a2a0f5e1f2dc046e4b9e2514dee18b187a0e1724d036315f77fa48e48f85533021d5e5525d798160a92d389d75512f3f9e1405
Diffstat (limited to 'src/qt/paymentserver.cpp')
-rw-r--r--src/qt/paymentserver.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp
index 4b6fdc8d57..92d7d72935 100644
--- a/src/qt/paymentserver.cpp
+++ b/src/qt/paymentserver.cpp
@@ -643,7 +643,7 @@ void PaymentServer::fetchPaymentACK(CWallet* wallet, const SendCoinsRecipient& r
// use for change. Despite an actual payment and not change, this is a close match:
// it's the output type we use subject to privacy issues, but not restricted by what
// other software supports.
- const OutputType change_type = g_change_type != OUTPUT_TYPE_NONE ? g_change_type : g_address_type;
+ const OutputType change_type = wallet->m_default_change_type != OutputType::NONE ? wallet->m_default_change_type : wallet->m_default_address_type;
wallet->LearnRelatedScripts(newKey, change_type);
CTxDestination dest = GetDestinationForKey(newKey, change_type);
wallet->SetAddressBook(dest, strAccount, "refund");