payment-request UI: use SendCoinsRecipient.message for memo

This commit is contained in:
Philip Kaufmann 2013-10-27 21:52:01 +01:00
parent c6c97e0f4e
commit 983cef4802
3 changed files with 4 additions and 5 deletions

View file

@ -450,7 +450,7 @@ bool PaymentServer::processPaymentRequest(PaymentRequestPlus& request, QList<Sen
recipients.append(SendCoinsRecipient()); recipients.append(SendCoinsRecipient());
recipients[0].paymentRequest = request; 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); request.getMerchant(PaymentServer::certStore, recipients[0].authenticatedMerchant);

View file

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

View file

@ -31,10 +31,9 @@ public:
// payment requests, we can abuse it for displaying an address list. // payment requests, we can abuse it for displaying an address list.
// Todo: This is a hack, should be replaced with a cleaner solution! // Todo: This is a hack, should be replaced with a cleaner solution!
QString address; 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; QString label;
qint64 amount; qint64 amount;
// If from a payment request, this is used for storing the memo
QString message; QString message;
// If from a payment request, paymentRequest.IsInitialized() will be true // If from a payment request, paymentRequest.IsInitialized() will be true