mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 10:07:58 +02:00
Make the call to receiveAt more robust
This commit is contained in:
parent
8f22c719b3
commit
16d51986a9
1 changed files with 6 additions and 0 deletions
|
@ -198,11 +198,17 @@ void Ledger::accountSuccess(QNetworkReply& reply) {
|
||||||
auto salt = QByteArray::fromBase64(data["salt"].toString().toUtf8());
|
auto salt = QByteArray::fromBase64(data["salt"].toString().toUtf8());
|
||||||
auto iv = QByteArray::fromBase64(data["iv"].toString().toUtf8());
|
auto iv = QByteArray::fromBase64(data["iv"].toString().toUtf8());
|
||||||
auto ckey = QByteArray::fromBase64(data["ckey"].toString().toUtf8());
|
auto ckey = QByteArray::fromBase64(data["ckey"].toString().toUtf8());
|
||||||
|
QString remotePublicKey = data["public_key"].toString();
|
||||||
|
|
||||||
wallet->setSalt(salt);
|
wallet->setSalt(salt);
|
||||||
wallet->setIv(iv);
|
wallet->setIv(iv);
|
||||||
wallet->setCKey(ckey);
|
wallet->setCKey(ckey);
|
||||||
|
|
||||||
|
QStringList localPublicKeys = wallet->listPublicKeys();
|
||||||
|
if (remotePublicKey.isEmpty() && !localPublicKeys.isEmpty()) {
|
||||||
|
receiveAt(localPublicKeys.first(), "");
|
||||||
|
}
|
||||||
|
|
||||||
// none of the hfc account info should be emitted
|
// none of the hfc account info should be emitted
|
||||||
emit accountResult(QJsonObject{ {"status", "success"} });
|
emit accountResult(QJsonObject{ {"status", "success"} });
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue