Validate wallet display names to avoid duplicate or misleading wallet labels #711

Closed
opened 2026-05-18 14:45:51 +00:00 by johnny9 · 2 comments
johnny9 commented 2026-05-18 14:45:51 +00:00 (Migrated from github.com)

Problem

Wallet display-name editing currently allows duplicate names and names that conflict with other wallet names/display names.

WalletQmlController::setWalletDisplayName() only trims the requested alias and stores or removes it in QSettings. It does not check whether the display name duplicates another loaded/listed wallet name or another stored display name.

Because wallet selector rows use the display-name role from WalletListModel, two distinct wallets can appear with the same visible label. This can make wallet selection and wallet settings ambiguous, especially after renaming one wallet to match another wallet's name or alias.

Expected behavior

The GUI should prevent or clearly reject wallet display names that would make wallets indistinguishable in user-facing wallet lists.

Possible approaches:

  • Reject display names that match another wallet's real name.
  • Reject display names that match another wallet's stored display name.
  • Show an inline validation error in Wallet Settings when the requested display name is empty/duplicate/conflicting as appropriate.

Notes

Raised as a follow-up from review of #551: https://github.com/bitcoin-core/gui-qml/pull/551#pullrequestreview-4310727801

Relevant code:

  • qml/walletqmlcontroller.cpp: setWalletDisplayName()
  • qml/models/walletlistmodel.cpp: wallet selector display-name role

Release Target

Preview

## Problem Wallet display-name editing currently allows duplicate names and names that conflict with other wallet names/display names. `WalletQmlController::setWalletDisplayName()` only trims the requested alias and stores or removes it in `QSettings`. It does not check whether the display name duplicates another loaded/listed wallet name or another stored display name. Because wallet selector rows use the display-name role from `WalletListModel`, two distinct wallets can appear with the same visible label. This can make wallet selection and wallet settings ambiguous, especially after renaming one wallet to match another wallet's name or alias. ## Expected behavior The GUI should prevent or clearly reject wallet display names that would make wallets indistinguishable in user-facing wallet lists. Possible approaches: - Reject display names that match another wallet's real name. - Reject display names that match another wallet's stored display name. - Show an inline validation error in Wallet Settings when the requested display name is empty/duplicate/conflicting as appropriate. ## Notes Raised as a follow-up from review of #551: https://github.com/bitcoin-core/gui-qml/pull/551#pullrequestreview-4310727801 Relevant code: - `qml/walletqmlcontroller.cpp`: `setWalletDisplayName()` - `qml/models/walletlistmodel.cpp`: wallet selector display-name role ## Release Target Preview
johnny9 commented 2026-05-18 14:55:36 +00:00 (Migrated from github.com)

Should be added into create wallet name validation

Should be added into create wallet name validation
pseudoramdom commented 2026-05-20 20:08:18 +00:00 (Migrated from github.com)

I'll take this.

I'll take this.
Sign in to join this conversation.
No description provided.