Detect library failures
This commit is contained in:
@@ -51,7 +51,13 @@ void ConnectionLoader::doAutoConnect() {
|
|||||||
// Check to see if there's an existing wallet
|
// Check to see if there's an existing wallet
|
||||||
if (litelib_wallet_exists(Settings::getChainName().toStdString().c_str())) {
|
if (litelib_wallet_exists(Settings::getChainName().toStdString().c_str())) {
|
||||||
main->logger->write(QObject::tr("Using existing wallet."));
|
main->logger->write(QObject::tr("Using existing wallet."));
|
||||||
litelib_initialize_existing(config->dangerous, config->server.toStdString().c_str());
|
char* resp = litelib_initialize_existing(config->dangerous, config->server.toStdString().c_str());
|
||||||
|
QString response = litelib_process_response(resp);
|
||||||
|
|
||||||
|
if (response.toUpper().trimmed() != "OK") {
|
||||||
|
showError(response);
|
||||||
|
return;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
main->logger->write(QObject::tr("Create/restore wallet."));
|
main->logger->write(QObject::tr("Create/restore wallet."));
|
||||||
createOrRestore(config->dangerous, config->server);
|
createOrRestore(config->dangerous, config->server);
|
||||||
|
|||||||
Reference in New Issue
Block a user