]> Nutra Git (v2) - gamesguru/feather.git/commitdiff
getAddressSafe: check torsion
authortobtoht <tob@featherwallet.org>
Tue, 18 Mar 2025 09:00:17 +0000 (10:00 +0100)
committertobtoht <tob@featherwallet.org>
Tue, 18 Mar 2025 09:11:33 +0000 (10:11 +0100)
src/libwalletqt/Wallet.cpp

index 4fed2adfe74076088a32400f261bfc02fb90a792..744518970234906fc412081fb8ae7a2f61121fbc 100644 (file)
@@ -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);
 }