aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/bitcoin.cpp')
-rw-r--r--src/qt/bitcoin.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/qt/bitcoin.cpp b/src/qt/bitcoin.cpp
index 5ab5d1f7ee..e7cf440044 100644
--- a/src/qt/bitcoin.cpp
+++ b/src/qt/bitcoin.cpp
@@ -213,7 +213,7 @@ int main(int argc, char *argv[])
// Do this early as we don't want to bother initializing if we are just calling IPC
// ... but do it after creating app and setting up translations, so errors are
// translated properly.
- if (PaymentServer::ipcSendCommandLine())
+ if (PaymentServer::ipcSendCommandLine(argc, argv))
exit(0);
// Now that translations are initialized check for errors and allow a translatable error message
@@ -299,6 +299,9 @@ int main(int argc, char *argv[])
optionsModel.Upgrade(); // Must be done after AppInit2
+ PaymentServer::LoadRootCAs();
+ paymentServer->initNetManager(optionsModel);
+
if (splashref)
splash.finish(&window);
@@ -320,8 +323,15 @@ int main(int argc, char *argv[])
}
// Now that initialization/startup is done, process any command-line
- // bitcoin: URIs
- QObject::connect(paymentServer, SIGNAL(receivedURI(QString)), &window, SLOT(handleURI(QString)));
+ // bitcoin: URIs or payment requests:
+ QObject::connect(paymentServer, SIGNAL(receivedPaymentRequest(SendCoinsRecipient)),
+ &window, SLOT(handlePaymentRequest(SendCoinsRecipient)));
+ QObject::connect(&walletModel, SIGNAL(coinsSent(CWallet*,SendCoinsRecipient,QByteArray)),
+ paymentServer, SLOT(fetchPaymentACK(CWallet*,const SendCoinsRecipient&,QByteArray)));
+ QObject::connect(paymentServer, SIGNAL(receivedPaymentACK(QString)),
+ &window, SLOT(showPaymentACK(QString)));
+ QObject::connect(paymentServer, SIGNAL(reportError(QString, QString, unsigned int)),
+ guiref, SLOT(message(QString, QString, unsigned int)));
QTimer::singleShot(100, paymentServer, SLOT(uiReady()));
app.exec();