diff options
| author | James O'Beirne <[email protected]> | 2018-04-10 11:50:10 -0400 |
|---|---|---|
| committer | James O'Beirne <[email protected]> | 2018-04-25 13:08:53 -0400 |
| commit | c5b277033a72650c221084ec0f1326623a810fd0 (patch) | |
| tree | 4ea793666e91c081e738dcab2cdfe2078c2e60c3 /src/qt/addresstablemodel.cpp | |
| parent | Merge #13073: test: add rpcauth-test to AC_CONFIG_LINKS to fix out-of-tree ma... (diff) | |
| download | discoin-c5b277033a72650c221084ec0f1326623a810fd0.tar.xz discoin-c5b277033a72650c221084ec0f1326623a810fd0.zip | |
Add purpose arg to Wallet::getAddress
Also make all arguments to getAddress required and document args at call sites.
Diffstat (limited to 'src/qt/addresstablemodel.cpp')
| -rw-r--r-- | src/qt/addresstablemodel.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qt/addresstablemodel.cpp b/src/qt/addresstablemodel.cpp index 1e3acd75c..d85a13cd5 100644 --- a/src/qt/addresstablemodel.cpp +++ b/src/qt/addresstablemodel.cpp @@ -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(); |