From c6c97e0f4e3d9d8d5b8a1e60174e9ff11e70b6c1 Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Thu, 24 Oct 2013 16:02:39 +0200 Subject: [Qt] Rework of payment request UI (mainly for insecure pr) - this shows insecure (unsecured) payment requests in a new yellowish colored UI (based on the secure payment request UI) instead of our normal payment UI - allows us to receive paymentACK messages for insecure payment requests - allows us to handle expirations for insecure payment request - changed walletmodel, so that all types of payment requests don't touch the addressbook --- src/qt/walletmodel.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/qt/walletmodel.h') diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h index 2e99eaddcb..59227bb743 100644 --- a/src/qt/walletmodel.h +++ b/src/qt/walletmodel.h @@ -25,14 +25,22 @@ public: explicit SendCoinsRecipient(const QString &addr, const QString &label, quint64 amount, const QString &message): address(addr), label(label), amount(amount), message(message) {} + // If from an insecure payment request, this is used for storing + // the addresses, e.g. address-A
address-B
address-C. + // Info: As we don't need to process addresses in here when using + // payment requests, we can abuse it for displaying an address list. + // Todo: This is a hack, should be replaced with a cleaner solution! QString address; + // If from a payment request, this is used for storing the memo + // Todo: This is a hack, should be replaced with a cleaner solution! QString label; qint64 amount; QString message; // If from a payment request, paymentRequest.IsInitialized() will be true PaymentRequestPlus paymentRequest; - QString authenticatedMerchant; // Empty if no authentication or invalid signature/cert/etc. + // Empty if no authentication or invalid signature/cert/etc. + QString authenticatedMerchant; }; /** Interface to Bitcoin wallet from Qt view code. */ @@ -160,7 +168,7 @@ signals: // this means that the unlocking failed or was cancelled. void requireUnlock(); - // Asynchronous message notification + // Fired when a message should be reported to the user void message(const QString &title, const QString &message, unsigned int style); // Coins sent: from wallet, to recipient, in (serialized) transaction: -- cgit v1.2.3 From 983cef48027f1bdf651c19d72cf615cf4345dbe6 Mon Sep 17 00:00:00 2001 From: Philip Kaufmann Date: Sun, 27 Oct 2013 21:52:01 +0100 Subject: payment-request UI: use SendCoinsRecipient.message for memo --- src/qt/walletmodel.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/qt/walletmodel.h') diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h index 59227bb743..467c3dea12 100644 --- a/src/qt/walletmodel.h +++ b/src/qt/walletmodel.h @@ -31,10 +31,9 @@ public: // payment requests, we can abuse it for displaying an address list. // Todo: This is a hack, should be replaced with a cleaner solution! QString address; - // If from a payment request, this is used for storing the memo - // Todo: This is a hack, should be replaced with a cleaner solution! QString label; qint64 amount; + // If from a payment request, this is used for storing the memo QString message; // If from a payment request, paymentRequest.IsInitialized() will be true -- cgit v1.2.3