From: tobtoht Date: Tue, 18 Mar 2025 09:00:17 +0000 (+0100) Subject: getAddressSafe: check torsion X-Git-Url: https://git.nutra.tk/v2?a=commitdiff_plain;h=45ea707c0ca5508a9052a806b2c348168fc0557b;p=gamesguru%2Ffeather.git getAddressSafe: check torsion --- diff --git a/src/libwalletqt/Wallet.cpp b/src/libwalletqt/Wallet.cpp index 4fed2adf..74451897 100644 --- a/src/libwalletqt/Wallet.cpp +++ b/src/libwalletqt/Wallet.cpp @@ -261,6 +261,16 @@ QString Wallet::getAddressSafe(quint32 accountIndex, quint32 addressIndex, bool return {}; } + if (!rct::isInMainSubgroup(rct::pk2rct(info.address.m_spend_public_key))) { + reason = "Spend public key is not is main subgroup"; + return {}; + } + + if (!rct::isInMainSubgroup(rct::pk2rct(info.address.m_view_public_key))) { + reason = "View public key is not in main subgroup"; + return {}; + } + ok = true; return QString::fromStdString(address_str); }