mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
build: Add --disable-bip70 configure option
This patch adds a --disable-bip70 configure option that disables BIP70 payment request support. When disabled, this removes the dependency of the GUI on OpenSSL and Protobuf.
This commit is contained in:
committed by
James Hilliard
parent
1d1417430c
commit
9dcf6c0dfe
@@ -2,6 +2,10 @@
|
||||
// Distributed under the MIT software license, see the accompanying
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include <config/bitcoin-config.h>
|
||||
#endif
|
||||
|
||||
#include <qt/sendcoinsentry.h>
|
||||
#include <qt/forms/ui_sendcoinsentry.h>
|
||||
|
||||
@@ -133,9 +137,11 @@ bool SendCoinsEntry::validate(interfaces::Node& node)
|
||||
// Check input validity
|
||||
bool retval = true;
|
||||
|
||||
#ifdef ENABLE_BIP70
|
||||
// Skip checks for payment request
|
||||
if (recipient.paymentRequest.IsInitialized())
|
||||
return retval;
|
||||
#endif
|
||||
|
||||
if (!model->validateAddress(ui->payTo->text()))
|
||||
{
|
||||
@@ -166,9 +172,11 @@ bool SendCoinsEntry::validate(interfaces::Node& node)
|
||||
|
||||
SendCoinsRecipient SendCoinsEntry::getValue()
|
||||
{
|
||||
#ifdef ENABLE_BIP70
|
||||
// Payment request
|
||||
if (recipient.paymentRequest.IsInitialized())
|
||||
return recipient;
|
||||
#endif
|
||||
|
||||
// Normal payment
|
||||
recipient.address = ui->payTo->text();
|
||||
@@ -196,6 +204,7 @@ void SendCoinsEntry::setValue(const SendCoinsRecipient &value)
|
||||
{
|
||||
recipient = value;
|
||||
|
||||
#ifdef ENABLE_BIP70
|
||||
if (recipient.paymentRequest.IsInitialized()) // payment request
|
||||
{
|
||||
if (recipient.authenticatedMerchant.isEmpty()) // unauthenticated
|
||||
@@ -216,6 +225,7 @@ void SendCoinsEntry::setValue(const SendCoinsRecipient &value)
|
||||
}
|
||||
}
|
||||
else // normal payment
|
||||
#endif
|
||||
{
|
||||
// message
|
||||
ui->messageTextLabel->setText(recipient.message);
|
||||
|
||||
Reference in New Issue
Block a user