main: display unspent amount in reserve proof checks
What changed, and why it matters
This commit is a minor user-interface improvement for the Monero GUI wallet. When a user checks a 'reserve proof' (a cryptographic attestation about how much Monero is held and spent), the result dialog now also shows the 'unspent' amount. The unspent amount is simply total minus spent, computed locally and displayed to the user. There is no security fix here.
No security action required. Treat as a normal feature/usability commit.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change updates the reserve-proof verification display path. In Wallet.cpp, checkReserveProof() now appends a fifth pipe-delimited field containing total - spent. In main.qml, the success message is updated from ‘Good signature on %1 total and %2 spent.’ to ‘Good signature on %1 total, %2 spent, %3 unspent.’ and reads results[4]. The C++ local variables good/total/spent are also initialized to safe defaults (false/0/0), which is defensive style but does not change behavior because they are passed by reference and overwritten by the underlying wallet implementation on success. No cryptographic, network, or wallet-core logic is modified.
Changed components
Monero GUI reserve proof verification dialogsrc/libwalletqt/Wallet.cpp checkReserveProof() result string formattingmain.qml reserve proof result displayInspect captured patch +5 / −5
### main.qml
@@ -1283,7 +1283,7 @@ ApplicationWindow {
else if (isReserveProof && results[0] === "true") {
var good = results[1] === "true";
informationPopup.title = qsTr("Reserve proof check") + translationManager.emptyString;
- informationPopup.text = good ? qsTr("Good signature on %1 total and %2 spent.").arg(walletManager.displayAmount(results[2])).arg(walletManager.displayAmount(results[3])) : qsTr("Bad signature");
+ informationPopup.text = good ? qsTr("Good signature on %1 total, %2 spent, %3 unspent.").arg(walletManager.displayAmount(results[2])).arg(walletManager.displayAmount(results[3])).arg(walletManager.displayAmount(results[4])) : qsTr("Bad signature");
}
else {
informationPopup.title = qsTr("Error") + translationManager.emptyString;
### src/libwalletqt/Wallet.cpp
@@ -1012,11 +1012,11 @@ Q_INVOKABLE QString Wallet::getReserveProof(bool all, quint32 account_index, con
Q_INVOKABLE QString Wallet::checkReserveProof(const QString &address, const QString &message, const QString &signature) const
{
- bool good;
- uint64_t total;
- uint64_t spent;
+ bool good = false;
+ uint64_t total = 0;
+ uint64_t spent = 0;
bool success = m_walletImpl->checkReserveProof(address.toStdString(), message.toStdString(), signature.toStdString(), good, total, spent);
- std::string result = std::string(success ? "true" : "false") + "|" + std::string(good ? "true" : "false") + "|" + QString::number(total).toStdString() + "|" + QString::number(spent).toStdString();
+ std::string result = std::string(success ? "true" : "false") + "|" + std::string(good ? "true" : "false") + "|" + QString::number(total).toStdString() + "|" + QString::number(spent).toStdString() + "|" + QString::number(total - spent).toStdString();
return QString::fromStdString(result);
}
Why this scored 15/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.