From f8447e9e8a961290e50fb4abb558130ecff70cf1 Mon Sep 17 00:00:00 2001 From: gg Date: Sun, 18 Jan 2026 15:04:42 -0500 Subject: [PATCH] wip good --- src/model/WalletKeysFilesModel.cpp | 3 ++- src/wizard/PageOpenWallet.cpp | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/model/WalletKeysFilesModel.cpp b/src/model/WalletKeysFilesModel.cpp index 343ad181..72ea124b 100644 --- a/src/model/WalletKeysFilesModel.cpp +++ b/src/model/WalletKeysFilesModel.cpp @@ -93,6 +93,7 @@ void WalletKeysFilesModel::findWallets() { const QString baseName = fileInfo.baseName(); const QString basePath = QString("%1/%2").arg(path).arg(baseName); QString addr = QString(""); + // Assume mainnet by default, set otherwise if needed quint8 networkType = NetworkType::MAINNET; if (Utils::fileExists(basePath + ".address.txt")) { @@ -104,7 +105,7 @@ void WalletKeysFilesModel::findWallets() { addr = _address; if (addr.startsWith("5") || addr.startsWith("7")) networkType = NetworkType::STAGENET; - else if (addr.startsWith("9") || addr.startsWith("B")) + else if (addr.startsWith("9") || addr.startsWith("A") || addr.startsWith("B")) networkType = NetworkType::TESTNET; } file.close(); diff --git a/src/wizard/PageOpenWallet.cpp b/src/wizard/PageOpenWallet.cpp index 90a961cd..2f16c71b 100644 --- a/src/wizard/PageOpenWallet.cpp +++ b/src/wizard/PageOpenWallet.cpp @@ -27,7 +27,9 @@ PageOpenWallet::PageOpenWallet(WalletKeysFilesModel *wallets, QWidget *parent) ui->walletTable->setSelectionBehavior(QAbstractItemView::SelectRows); ui->walletTable->setContextMenuPolicy(Qt::CustomContextMenu); ui->walletTable->setModel(m_keysProxy); - ui->walletTable->hideColumn(WalletKeysFilesModel::NetworkType); + // Only show 'wallet type' column in stagenet or testnet mode + if (constants::networkType == NetworkType::MAINNET) + ui->walletTable->hideColumn(WalletKeysFilesModel::NetworkType); ui->walletTable->hideColumn(WalletKeysFilesModel::Path); ui->walletTable->hideColumn(WalletKeysFilesModel::Modified); ui->walletTable->header()->setSectionResizeMode(WalletKeysFilesModel::FileName, QHeaderView::Stretch); -- 2.52.0