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")) {
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();
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);