return;
}
+ if (!m_wallet->isAddressTorsionFree(address)) {
+ Utils::showWarning(this, "Address is not torsion-free", "This address is not compatible with reference wallets.\n\nSending to this address MAY RESULT IN A LOSS OF FUNDS.");
+ return;
+ }
+
SubaddressIndex index = m_wallet->subaddressIndex(address);
if (!index.isValid()) {
// TODO: probably mention lookahead here
return QString("%1:%2").arg(QString::number(lookahead.first), QString::number(lookahead.second));
}
+bool Wallet::isAddressTorsionFree(const QString& address) {
+ cryptonote::address_parse_info info;
+ bool r = cryptonote::get_account_address_from_str(info, m_wallet2->nettype(), address.toStdString());
+ if (!r) {
+ return false;
+ }
+ return rct::isInMainSubgroup(rct::pk2rct(info.address.m_spend_public_key)) && rct::isInMainSubgroup(rct::pk2rct(info.address.m_view_public_key));
+}
+
// #################### Seed ####################
QString Wallet::getSeed(const QString &seedOffset) const {
void deviceShowAddressAsync(quint32 accountIndex, quint32 addressIndex, const QString &paymentId);
QString getSubaddressLookahead() const;
+ bool isAddressTorsionFree(const QString& address);
+
// ##### Seed #####
//! returns mnemonic seed