diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-04-25 19:15:30 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2018-04-25 19:32:32 +0200 |
commit | 25ad2f75f5d105d30d2ca716a66138a6b32a8c68 (patch) | |
tree | 0836355a6740398437a4ffab523ffa78886fdde0 /src/qt/editaddressdialog.h | |
parent | a785bc3667d3c11a014da77436a23b1b865458a4 (diff) | |
parent | 5109fc4a9cb2cbd73c33197fb9129e1413ab051b (diff) |
Merge #12830: [qt] [tests] Clarify address book error messages, add tests
5109fc4 [tests] [qt] Add tests for address book manipulation via EditAddressDialog (James O'Beirne)
9c01be1 [tests] [qt] Introduce qt/test/util with a generalized ConfirmMessage (James O'Beirne)
8cdcaee [qt] Display more helpful message when adding a send address has failed (James O'Beirne)
c5b2770 Add purpose arg to Wallet::getAddress (James O'Beirne)
Pull request description:
Addresses https://github.com/bitcoin/bitcoin/issues/12796.
When a user attempts to add to the address book a sending address which is already present as a receiving address, they're presented with a confusing error indicating the address is already present in the book, despite the fact that this row is currently invisible.

This change adds a more specific error message indicating its existence as a receiving address (as discussed in the linked issue).

This change also adds some tests exercising use of the address book via QT. Adding so much test code for such a trivial change may seem weird, but it's my hope that this will make further test-writing for address book usage (and other QT features) more approachable.
Tree-SHA512: fbdd5564f7a9a2380bbe437f3378e8d4d5fd9201efff4879b72bc23f2cc1c2eecaf2b811994c25070ee052422e48e47901787c2e62cc584774a997fe6a2a327a
Diffstat (limited to 'src/qt/editaddressdialog.h')
-rw-r--r-- | src/qt/editaddressdialog.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/qt/editaddressdialog.h b/src/qt/editaddressdialog.h index 41c5d1708a..3aba74bf08 100644 --- a/src/qt/editaddressdialog.h +++ b/src/qt/editaddressdialog.h @@ -30,7 +30,7 @@ public: EditSendingAddress }; - explicit EditAddressDialog(Mode mode, QWidget *parent); + explicit EditAddressDialog(Mode mode, QWidget *parent = 0); ~EditAddressDialog(); void setModel(AddressTableModel *model); @@ -45,6 +45,9 @@ public Q_SLOTS: private: bool saveCurrentRow(); + /** Return a descriptive string when adding an already-existing address fails. */ + QString getDuplicateAddressWarning() const; + Ui::EditAddressDialog *ui; QDataWidgetMapper *mapper; Mode mode; |