diff options
Diffstat (limited to 'src/qt/paymentserver.cpp')
-rw-r--r-- | src/qt/paymentserver.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/qt/paymentserver.cpp b/src/qt/paymentserver.cpp index f6a4b599de..219a685faf 100644 --- a/src/qt/paymentserver.cpp +++ b/src/qt/paymentserver.cpp @@ -10,6 +10,7 @@ #include "optionsmodel.h" #include "base58.h" +#include "chainparams.h" #include "ui_interface.h" #include "util.h" #include "wallet.h" @@ -200,8 +201,11 @@ bool PaymentServer::ipcParseCommandLine(int argc, char* argv[]) { CBitcoinAddress address(r.address.toStdString()); - SelectParams(CBaseChainParams::MAIN); - if (!address.IsValid()) + if (address.IsValid(Params(CBaseChainParams::MAIN))) + { + SelectParams(CBaseChainParams::MAIN); + } + else if (address.IsValid(Params(CBaseChainParams::TESTNET))) { SelectParams(CBaseChainParams::TESTNET); } |