fix: wallet_info for non-deterministic wallets
What changed, and why it matters
This commit fixes how Monero's wallet information display labels non-deterministic wallets (wallets not created from a standard seed phrase). Previously, these wallets were incorrectly labeled as 'Normal' with a 'Legacy' seed type. The change adds proper labels like 'Non-deterministic' and 'None' for seed type, and also adds a 'Hardware' wallet type label. This is a user-interface and reporting correction, not a security fix.
No security action required. This is a UI/reporting accuracy improvement. Users may appreciate the clearer wallet classification, but it does not address a vulnerability.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch updates wallet_info() in both simplewallet (CLI) and the wallet RPC server to correctly classify wallet types. It reorders checks so that background, hardware, and non-deterministic wallets are detected before falling through to the deterministic ‘Normal’ label. It also corrects seed_type reporting for non-deterministic wallets to ‘None’ instead of ‘Legacy’. The changes are purely informational string labels with no cryptographic, access-control, or network behavior modifications.
Changed components
src/simplewallet/simplewallet.cppsrc/wallet/wallet_rpc_server.cppInspect captured patch +22 / −6
### src/simplewallet/simplewallet.cpp
@@ -9966,10 +9966,15 @@ bool simple_wallet::wallet_info(const std::vector<std::string> &args)
else if (ms_status.multisig_is_active)
type = (boost::format(tr("%u/%u multisig%s")) % ms_status.threshold % ms_status.total % (ms_status.is_ready ? "" : " (not yet finalized)")).str();
else if (m_wallet->is_background_wallet())
- type = tr("Background wallet");
+ type = tr("Background");
+ else if (m_wallet->key_on_device())
+ type = tr("Hardware");
+ // check other wallet types before is_deterministic(), because it also returns false for e.g. watch-only and HW wallets
+ else if (!m_wallet->is_deterministic())
+ type = tr("Non-deterministic");
else
type = tr("Normal");
- message_writer() << tr("Type: ") << type;
+ message_writer() << tr("Wallet Type: ") << type;
message_writer() << tr("Network type: ") << (
m_wallet->nettype() == cryptonote::TESTNET ? tr("Testnet") :
m_wallet->nettype() == cryptonote::STAGENET ? tr("Stagenet") : tr("Mainnet"));
@@ -9983,6 +9988,11 @@ bool simple_wallet::wallet_info(const std::vector<std::string> &args)
{
type = tr("Polyseed");
}
+ // e.g. watch-only and HW wallets also fall into this category
+ else if (!m_wallet->is_deterministic())
+ {
+ type = tr("None");
+ }
else
{
type = tr("Legacy");
### src/wallet/wallet_rpc_server.cpp
@@ -653,7 +653,11 @@ namespace tools
else if (ms_status.multisig_is_active)
res.wallet_type = (boost::format("%u/%u multisig%s") % ms_status.threshold % ms_status.total % (ms_status.is_ready ? "" : " (not yet finalized)")).str();
else if (m_wallet->is_background_wallet())
- res.wallet_type = "Background wallet";
+ res.wallet_type = "Background";
+ else if (m_wallet->key_on_device())
+ res.wallet_type = "Hardware";
+ else if (!m_wallet->is_deterministic())
+ res.wallet_type = "Non-deterministic";
else
res.wallet_type = "Normal";
res.network_type = m_wallet->nettype() == cryptonote::TESTNET ? "Testnet"
@@ -675,11 +679,13 @@ namespace tools
}
if (ms_status.multisig_is_active)
- res.seed_type = tr("Multisig");
+ res.seed_type = "Multisig";
else if (m_wallet->is_polyseed())
- res.seed_type = tr("Polyseed");
+ res.seed_type = "Polyseed";
+ else if (!m_wallet->is_deterministic())
+ res.seed_type = "None";
else
- res.seed_type = tr("Legacy");
+ res.seed_type = "Legacy";
return true;
}Why this scored 18/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.