aboutsummaryrefslogtreecommitdiff
path: root/src/qt/rpcconsole.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-05-28 17:04:11 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2018-05-28 17:10:36 +0200
commita315b79ad2b8f76b66f8c2b79bbe5da43cca8b4a (patch)
treecd50ed1a04671b72b2a806acf61047af1c89bec2 /src/qt/rpcconsole.cpp
parent14a4b4966361969badfa3b977753a37760b8eb8a (diff)
parent2885c131b6b8ec1140e02ed8f2933c2ffbf41fd1 (diff)
downloadbitcoin-a315b79ad2b8f76b66f8c2b79bbe5da43cca8b4a.tar.xz
Merge #13275: Qt: use [default wallet] as name for wallet with no name
2885c131b6b8ec1140e02ed8f2933c2ffbf41fd1 Qt: use [default wallet] as name for wallet with no name (Jonas Schnelli) Pull request description: Loading a wallet from a state where only the default wallet was active results in using an empty string for the initial/default wallet name. This is a GUI only quick-fix that overrides wallet(s) with name "" to "[default wallet]". Does not affect `getwalletinfo` or `listwallets`. Also, unsure if it should be fixed at a deeper level and if – instead of [default wallet] – it should use `wallet.dat` (the filename of the default wallet). Tree-SHA512: 1d50dbb200b23df5ac53ce15aeb6453af4da354d6e6e53fe33ff075b477493254d6028b6d3569a7804b1aa616cb9a988a53de818937e37cdcb19cb70a90e2a88
Diffstat (limited to 'src/qt/rpcconsole.cpp')
-rw-r--r--src/qt/rpcconsole.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qt/rpcconsole.cpp b/src/qt/rpcconsole.cpp
index 4032729a84..85e3586d64 100644
--- a/src/qt/rpcconsole.cpp
+++ b/src/qt/rpcconsole.cpp
@@ -702,7 +702,8 @@ void RPCConsole::addWallet(WalletModel * const walletModel)
{
const QString name = walletModel->getWalletName();
// use name for text and internal data object (to allow to move to a wallet id later)
- ui->WalletSelector->addItem(name, name);
+ QString display_name = name.isEmpty() ? "["+tr("default wallet")+"]" : name;
+ ui->WalletSelector->addItem(display_name, name);
if (ui->WalletSelector->count() == 2 && !isVisible()) {
// First wallet added, set to default so long as the window isn't presently visible (and potentially in use)
ui->WalletSelector->setCurrentIndex(1);