Browse Source

payment-request UI: use SendCoinsRecipient.message for memo

0.10
Philip Kaufmann 11 years ago
parent
commit
983cef4802
  1. 2
      src/qt/paymentserver.cpp
  2. 4
      src/qt/sendcoinsentry.cpp
  3. 3
      src/qt/walletmodel.h

2
src/qt/paymentserver.cpp

@ -450,7 +450,7 @@ bool PaymentServer::processPaymentRequest(PaymentRequestPlus& request, QList<Sen @@ -450,7 +450,7 @@ bool PaymentServer::processPaymentRequest(PaymentRequestPlus& request, QList<Sen
recipients.append(SendCoinsRecipient());
recipients[0].paymentRequest = request;
recipients[0].label = GUIUtil::HtmlEscape(request.getDetails().memo()); // Todo: Change to .message once available
recipients[0].message = GUIUtil::HtmlEscape(request.getDetails().memo());
request.getMerchant(PaymentServer::certStore, recipients[0].authenticatedMerchant);

4
src/qt/sendcoinsentry.cpp

@ -171,7 +171,7 @@ void SendCoinsEntry::setValue(const SendCoinsRecipient &value) @@ -171,7 +171,7 @@ void SendCoinsEntry::setValue(const SendCoinsRecipient &value)
if (recipient.authenticatedMerchant.isEmpty()) // insecure
{
ui->payTo_is->setText(recipient.address);
ui->memoTextLabel_is->setText(recipient.label);
ui->memoTextLabel_is->setText(recipient.message);
ui->payAmount_is->setValue(recipient.amount);
ui->payAmount_is->setReadOnly(true);
setCurrentWidget(ui->SendCoins_InsecurePaymentRequest);
@ -179,7 +179,7 @@ void SendCoinsEntry::setValue(const SendCoinsRecipient &value) @@ -179,7 +179,7 @@ void SendCoinsEntry::setValue(const SendCoinsRecipient &value)
else // secure
{
ui->payTo_s->setText(recipient.authenticatedMerchant);
ui->memoTextLabel_s->setText(recipient.label);
ui->memoTextLabel_s->setText(recipient.message);
ui->payAmount_s->setValue(recipient.amount);
ui->payAmount_s->setReadOnly(true);
setCurrentWidget(ui->SendCoins_SecurePaymentRequest);

3
src/qt/walletmodel.h

@ -31,10 +31,9 @@ public: @@ -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

Loading…
Cancel
Save