mirror of
https://github.com/lubosz/overte.git
synced 2025-04-13 18:52:13 +02:00
generate a new keypair if one isn't found in settings
This commit is contained in:
parent
9a3ba972e1
commit
e4b19545b0
2 changed files with 7 additions and 0 deletions
|
@ -146,6 +146,12 @@ void AccountManager::setAuthURL(const QUrl& authURL) {
|
|||
} else {
|
||||
requestProfile();
|
||||
}
|
||||
|
||||
// if we don't have a private key in settings we should generate a new keypair
|
||||
if (!_accountInfo.hasPrivateKey()) {
|
||||
qDebug() << "No private key present - generating a new key-pair.";
|
||||
generateNewKeypair();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@ public:
|
|||
void setWalletID(const QUuid& walletID);
|
||||
|
||||
const QByteArray& getUsernameSignature();
|
||||
bool hasPrivateKey() const { return !_privateKey.isEmpty(); }
|
||||
void setPrivateKey(const QByteArray& privateKey);
|
||||
|
||||
qint64 getBalance() const { return _balance; }
|
||||
|
|
Loading…
Reference in a new issue