fix to find hush wallet.dat at startup

This commit is contained in:
DenioD
2019-10-27 10:54:23 +01:00
parent 3f9fd047fd
commit 09a7682afd
8 changed files with 4136 additions and 21 deletions

4127
compile_commands.json Normal file

File diff suppressed because it is too large Load Diff

BIN
silentdragonlite Executable file

Binary file not shown.

View File

@@ -56,14 +56,11 @@ void ConnectionLoader::doAutoConnect() {
if (response.toUpper().trimmed() != "OK") { if (response.toUpper().trimmed() != "OK") {
showError(response); showError(response);
return; return;
} }
} else { } else {
main->logger->write(QObject::tr("Create/restore wallet.")); main->logger->write(QObject::tr("Create/restore wallet."));
char* resp = litelib_initialize_existing(config->dangerous, config->server.toStdString().c_str()); createOrRestore(config->dangerous, config->server);
QString response = litelib_process_response(resp);
d->show(); d->show();
} }

View File

@@ -344,7 +344,7 @@ void Controller::refreshTransactions() {
for (auto o: it["outgoing_metadata"].get<json::array_t>()) { for (auto o: it["outgoing_metadata"].get<json::array_t>()) {
QString address = QString::fromStdString(o["address"]); QString address = QString::fromStdString(o["address"]);
double amount = -1 * o ["value"].get<json::number_float_t>() /100000000; // Sent items are -ve double amount = -1 * o ["value"].get<json::number_unsigned_t>(); // Sent items are -ve
// Check for Memos // Check for Memos

View File

@@ -150,10 +150,6 @@ public:
parser.setApplicationDescription("Shielded desktop light wallet for hush"); parser.setApplicationDescription("Shielded desktop light wallet for hush");
parser.addHelpOption(); parser.addHelpOption();
// Add an option to specify the conf file
QCommandLineOption confOption(QStringList() << "conf", "Use the hush.conf specified instead of looking for the default one.",
"confFile");
parser.addOption(confOption);
// Positional argument will specify a hush payment URI // Positional argument will specify a hush payment URI
parser.addPositionalArgument("HUSHURI", "An optional hush URI to pay"); parser.addPositionalArgument("HUSHURI", "An optional hush URI to pay");
@@ -208,11 +204,6 @@ public:
Settings::getInstance()->setUseEmbedded(false); Settings::getInstance()->setUseEmbedded(false);
// Check to see if a conf location was specified
if (parser.isSet(confOption)) {
Settings::getInstance()->setUsinghushConf(parser.value(confOption));
}
w = new MainWindow(); w = new MainWindow();
w->setWindowTitle("SilentDragonLite v" + QString(APP_VERSION)); w->setWindowTitle("SilentDragonLite v" + QString(APP_VERSION));

View File

@@ -6,8 +6,8 @@
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
<MediaTemplate EmbedCab="yes"/> <MediaTemplate EmbedCab="yes"/>
<Icon Id="hushqtwalleticon.exe" SourceFile="res/icon.ico"/> <Icon Id="silentdragonlite.exe" SourceFile="res/icon.ico"/>
<Property Id="ARPPRODUCTICON" Value="hushqtwalleticon.exe" /> <Property Id="ARPPRODUCTICON" Value="silentdragonlite.exe" />
<Feature Id="ProductFeature" Title="silentdragonlite" Level="1"> <Feature Id="ProductFeature" Title="silentdragonlite" Level="1">
<ComponentGroupRef Id="ProductComponents" /> <ComponentGroupRef Id="ProductComponents" />
@@ -57,7 +57,7 @@
<Component Id="ProductComponent" Guid="0D210F5A-53E0-4E7E-CAAD-15A26995505E"> <Component Id="ProductComponent" Guid="0D210F5A-53E0-4E7E-CAAD-15A26995505E">
<File Source="silentdragon.exe" KeyPath="yes"> <File Source="silentdragon.exe" KeyPath="yes">
<Shortcut Id="startMenuShotcut" Advertise="yes" Directory="ApplicationProgramsFolder" <Shortcut Id="startMenuShotcut" Advertise="yes" Directory="ApplicationProgramsFolder"
Name="silentdragon" WorkingDirectory="INSTALLFOLDER" Icon="hushqtwalleticon.exe" > Name="silentdragon" WorkingDirectory="INSTALLFOLDER" Icon="silentdragonlite.exe" >
</Shortcut> </Shortcut>
</File> </File>
<File Source="LICENSE" /> <File Source="LICENSE" />

View File

@@ -119,7 +119,7 @@ public:
static bool addTohushConf(QString confLocation, QString line); static bool addTohushConf(QString confLocation, QString line);
static bool removeFromhushConf(QString confLocation, QString option); static bool removeFromhushConf(QString confLocation, QString option);
static QString getChainName() { return QString("test"); } static QString getChainName() { return QString("main"); }
static const QString labelRegExp; static const QString labelRegExp;

View File

@@ -112,7 +112,7 @@ void WormholeClient::connect() {
QObject::connect(m_webSocket, &QWebSocket::connected, this, &WormholeClient::onConnected); QObject::connect(m_webSocket, &QWebSocket::connected, this, &WormholeClient::onConnected);
QObject::connect(m_webSocket, &QWebSocket::disconnected, this, &WormholeClient::closed); QObject::connect(m_webSocket, &QWebSocket::disconnected, this, &WormholeClient::closed);
m_webSocket->open(QUrl("wss://wormhole.hushqtwallet.com:443")); m_webSocket->open(QUrl("wss://wormhole.silentdragonlite.com:443"));
//m_webSocket->open(QUrl("ws://127.0.0.1:7070")); //m_webSocket->open(QUrl("ws://127.0.0.1:7070"));
} }