qt: drop unused watch-only functionality #32459

pull Sjors wants to merge 2 commits into bitcoin:master from Sjors:2025/05/qt-watch-only changing 17 files +30 −306
  1. Sjors commented at 2:36 pm on May 9, 2025: member

    The watch-only functionality in the GUI was only used for legacy wallets. Watch-only descriptor wallets do not use this.

    The only visible changes of this PR should be:

    • dropped “Spendable:” label from the overview tab
    • column width cache is reset

    This PR also removes some unused variables from the interface.

  2. DrahtBot commented at 2:36 pm on May 9, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32459.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    Stale ACK achow101

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #32523 (wallet: Remove watchonly behavior and isminetypes by achow101)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  3. DrahtBot added the label GUI on May 9, 2025
  4. in src/qt/bitcoinstrings.cpp:320 in 7614f3c132 outdated
    316@@ -317,12 +317,9 @@ QT_TRANSLATE_NOOP("bitcoin-core", "Error reading configuration file: %s"),
    317 QT_TRANSLATE_NOOP("bitcoin-core", "Error reading from database, shutting down."),
    318 QT_TRANSLATE_NOOP("bitcoin-core", "Error reading next record from wallet database"),
    319 QT_TRANSLATE_NOOP("bitcoin-core", "Error: Cannot extract destination from the generated scriptpubkey"),
    320-QT_TRANSLATE_NOOP("bitcoin-core", "Error: Could not add watchonly tx %s to watchonly wallet"),
    


    maflcko commented at 2:38 pm on May 9, 2025:
    this should probably be a separate commit, just updating the whole file, or nothing in the file?

    hebasto commented at 2:44 pm on May 9, 2025:

    Sjors commented at 9:52 am on May 12, 2025:
    Dropped the file.
  5. fanquake commented at 3:05 pm on May 10, 2025: member
    Can be rebased now.
  6. Sjors force-pushed on May 12, 2025
  7. Sjors marked this as ready for review on May 12, 2025
  8. fanquake added this to the milestone 30.0 on May 12, 2025
  9. Sjors marked this as a draft on May 12, 2025
  10. Sjors commented at 10:11 am on May 12, 2025: member
    Somehow the Date column disappeared.
  11. hebasto commented at 10:51 am on May 12, 2025: member
    Are these lines still necessary:https://github.com/bitcoin/bitcoin/blob/59e09e0fb7b4cf8f8db97c2f81a8f6f69fe6cacf/src/interfaces/wallet.h#L374-L377 ?
  12. in src/qt/transactionview.h:59 in 0bddeaa078 outdated
    53@@ -54,9 +54,9 @@ class TransactionView : public QWidget
    54 
    55     enum ColumnWidths {
    56         STATUS_COLUMN_WIDTH = 30,
    57-        WATCHONLY_COLUMN_WIDTH = 23,
    58         DATE_COLUMN_WIDTH = 120,
    59         TYPE_COLUMN_WIDTH = 113,
    60+        LABEL_MINIMUM_COLUMN_WIDTH = 120,
    


    hebasto commented at 11:08 am on May 12, 2025:
    Where is this value used?

    Sjors commented at 11:10 am on May 12, 2025:
    It’s not, dropping it again.
  13. Sjors force-pushed on May 12, 2025
  14. Sjors commented at 11:11 am on May 12, 2025: member

    Are these lines still necessary:

    I got rid of them.

    For some reason QT is hiding column 1, which happens to be the date, but it also happens if I e.g. swap the date and type column.


    Aha, QT caches column layout between sessions, so it remembers how this column behaved on an earlier run.

  15. hebasto commented at 11:19 am on May 12, 2025: member

    Are these lines still necessary:

    I got rid of them.

    For some reason QT is hiding column 1, which happens to be the date, but it also happens if I e.g. swap the date and type column.

    Aha, QT caches column layout between sessions, so it remembers how this column behaved on an earlier run.

    ^ Indeed.

    See: https://github.com/bitcoin/bitcoin/blob/59e09e0fb7b4cf8f8db97c2f81a8f6f69fe6cacf/src/qt/transactionview.cpp#L204

  16. Sjors force-pushed on May 12, 2025
  17. Sjors commented at 11:34 am on May 12, 2025: member
    I renamed TransactionViewHeaderState so that it’s reset. This prevents hiding the date column.
  18. hebasto commented at 11:36 am on May 12, 2025: member

    I renamed TransactionViewHeaderState so that it’s reset. This prevents hiding the date column.

    A more general approach would involve versioning, though.

  19. Sjors force-pushed on May 12, 2025
  20. Sjors marked this as ready for review on May 12, 2025
  21. Sjors commented at 11:39 am on May 12, 2025: member

    Added a release note.

    A more general approach would involve versioning

    I’m open to suggestions. Though this screen is unlikely to change again between now and when we switch to QML.

  22. luke-jr commented at 11:50 am on May 14, 2025: member
    Shouldn’t this be on the GUI repo?
  23. Sjors commented at 12:34 pm on May 14, 2025: member
    Doesn’t seem worth moving, and this PR also touches the interface, but I opened a tracking issue on the GUI repo that points here. There’s probably more than what I found here.
  24. fanquake requested review from davidgumberg on May 16, 2025
  25. fanquake requested review from hebasto on May 16, 2025
  26. achow101 commented at 8:15 pm on May 16, 2025: member

    ACK 0fc9bf05c36169ff746df10c5c8310f5adf2e202

    There does not appear to be any visual differences, nor any remaining references to watch-only/watchonly in the GUI.

  27. hebasto commented at 7:53 am on May 19, 2025: member
    In src/qt/forms/overviewpage.ui, after removing all items from row="0" of the gridLayout element, all subsequent rows should be renumbered as follows: 1 -> 0, 2 -> 1, 3 -> 2, 4 -> 3, 5 -> 4.
  28. qt: drop unused watch-only functionality
    The watch-only functionality in the GUI was only used for legacy wallets.
    Watch-only descriptor wallets do not use this.
    
    The only visible changes of this commit are:
    - dropped "Spendable:" label from the overview tab
    - column width cache is reset
    e99188e7da
  29. wallet: drop watch-only things from interface e8661aac75
  30. Sjors force-pushed on May 19, 2025
  31. Sjors commented at 8:11 am on May 19, 2025: member
    Rebased just in case. Renumbered columns in overviewpage.ui.
  32. DrahtBot added the label CI failed on May 19, 2025

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-05-20 03:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me