Browse Source

fix to find hush wallet.dat at startup

pull/14/head
DenioD 5 years ago
parent
commit
09a7682afd
  1. 4127
      compile_commands.json
  2. BIN
      silentdragonlite
  3. 7
      src/connection.cpp
  4. 2
      src/controller.cpp
  5. 11
      src/main.cpp
  6. 6
      src/scripts/zec-qt-wallet.wxs
  7. 2
      src/settings.h
  8. 2
      src/websockets.cpp

4127
compile_commands.json

File diff suppressed because it is too large

BIN
silentdragonlite

Binary file not shown.

7
src/connection.cpp

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

2
src/controller.cpp

@ -344,7 +344,7 @@ void Controller::refreshTransactions() {
for (auto o: it["outgoing_metadata"].get<json::array_t>()) {
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

11
src/main.cpp

@ -150,11 +150,7 @@ public:
parser.setApplicationDescription("Shielded desktop light wallet for hush");
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
parser.addPositionalArgument("HUSHURI", "An optional hush URI to pay");
@ -207,11 +203,6 @@ public:
}
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->setWindowTitle("SilentDragonLite v" + QString(APP_VERSION));

6
src/scripts/zec-qt-wallet.wxs

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

2
src/settings.h

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

2
src/websockets.cpp

@ -112,7 +112,7 @@ void WormholeClient::connect() {
QObject::connect(m_webSocket, &QWebSocket::connected, this, &WormholeClient::onConnected);
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"));
}

Loading…
Cancel
Save