mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Add purpose arg to Wallet::getAddress
Also make all arguments to getAddress required and document args at call sites.
This commit is contained in:
@@ -266,7 +266,8 @@ bool AddressTableModel::setData(const QModelIndex &index, const QVariant &value,
|
||||
}
|
||||
// Check for duplicate addresses to prevent accidental deletion of addresses, if you try
|
||||
// to paste an existing address over another address (with a different label)
|
||||
if (walletModel->wallet().getAddress(newAddress))
|
||||
if (walletModel->wallet().getAddress(
|
||||
newAddress, /* name= */ nullptr, /* is_mine= */ nullptr, /* purpose= */ nullptr))
|
||||
{
|
||||
editStatus = DUPLICATE_ADDRESS;
|
||||
return false;
|
||||
@@ -351,7 +352,8 @@ QString AddressTableModel::addRow(const QString &type, const QString &label, con
|
||||
}
|
||||
// Check for duplicate addresses
|
||||
{
|
||||
if(walletModel->wallet().getAddress(DecodeDestination(strAddress)))
|
||||
if (walletModel->wallet().getAddress(
|
||||
DecodeDestination(strAddress), /* name= */ nullptr, /* is_mine= */ nullptr, /* purpose= */ nullptr))
|
||||
{
|
||||
editStatus = DUPLICATE_ADDRESS;
|
||||
return QString();
|
||||
|
||||
Reference in New Issue
Block a user