wallet: fix subaddress lookahead when restoring from 25 word seed
What changed, and why it matters
This commit fixes a bug in the Feather Wallet software where restoring a wallet from a 25-word Monero seed ignored the user's chosen subaddress lookahead setting. Subaddress lookahead controls how many future receiving addresses the wallet scans for. If set too low during restore, the wallet might miss transactions sent to addresses it generated earlier, making the balance look smaller than it actually is. The fix simply passes the user's chosen lookahead value into the recovery function instead of using a default.
Users who restored a wallet from a 25-word Monero seed with a non-default subaddress lookahead should update to the fixed version and consider rescanning or restoring again with the intended lookahead to ensure all transactions and balances are detected. Developers should audit other wallet creation paths for similar missing parameter forwarding.
Security signals we found
Missing parameter in wallet recovery path could cause incomplete transaction discovery
Subaddress lookahead mismatch between wallet creation and recovery paths
Functional bug with potential financial impact (incorrect displayed balance)
Evidence from the diff
In WindowManager::tryCreateWallet(), the MONERO seed branch now passes subaddressLookahead to WalletManager::recoveryWallet(). The WalletManager::recoveryWallet() implementation now forwards that subaddressLookahead string to the underlying Monero::WalletManager::recoveryWallet() call. Previously the parameter was omitted, so the wallet library would fall back to its default lookahead. This is a correctness fix for deterministic subaddress scanning during 25-word seed restoration.
Changed components
src/WindowManager.cppsrc/libwalletqt/WalletManager.cpp25-word Monero seed wallet restoration flowInspect captured patch +2 / −2
diff --git a/src/WindowManager.cpp b/src/WindowManager.cpp
index 545fe92..e636cd4 100644
--- a/src/WindowManager.cpp
+++ b/src/WindowManager.cpp
@@ -377,7 +377,7 @@ void WindowManager::tryCreateWallet(Seed seed, const QString &path, const QStrin
wallet = m_walletManager->createDeterministicWalletFromSpendKey(path, password, seed.language, constants::networkType, seed.spendKey, seed.restoreHeight, constants::kdfRounds, seedOffset, subaddressLookahead);
}
else if (seed.type == Seed::Type::MONERO) {
- wallet = m_walletManager->recoveryWallet(path, password, seed.mnemonic.join(" "), seedOffset, constants::networkType, seed.restoreHeight, constants::kdfRounds);
+ wallet = m_walletManager->recoveryWallet(path, password, seed.mnemonic.join(" "), seedOffset, constants::networkType, seed.restoreHeight, constants::kdfRounds, subaddressLookahead);
}
if (!wallet) {
diff --git a/src/libwalletqt/WalletManager.cpp b/src/libwalletqt/WalletManager.cpp
index 0f58813..eb7e9d8 100644
--- a/src/libwalletqt/WalletManager.cpp
+++ b/src/libwalletqt/WalletManager.cpp
@@ -115,7 +115,7 @@ Wallet *WalletManager::recoveryWallet(const QString &path, const QString &passwo
{
QMutexLocker locker(&m_mutex);
- Monero::Wallet * w = m_pimpl->recoveryWallet(path.toStdString(), password.toStdString(), seed.toStdString(), static_cast<Monero::NetworkType>(nettype), restoreHeight, kdfRounds, seed_offset.toStdString());
+ Monero::Wallet * w = m_pimpl->recoveryWallet(path.toStdString(), password.toStdString(), seed.toStdString(), static_cast<Monero::NetworkType>(nettype), restoreHeight, kdfRounds, seed_offset.toStdString(), subaddressLookahead.toStdString());
return new Wallet(w);
}
Why this scored 28/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.