6
lib/Cargo.lock
generated
6
lib/Cargo.lock
generated
@@ -1051,7 +1051,7 @@ version = "0.1.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
|
"libc 0.2.65 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"silentdragonlitelib 0.1.0 (git+https://github.com/DenioD/silentdragonlite-cli?rev=3a74fda1da22f35da8dc5973eb782338899810cb)",
|
"silentdragonlitelib 0.1.0 (git+https://github.com/DenioD/silentdragonlite-cli?rev=89ee34ba526d9d45a72787b07af9407bd96a337c)",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1467,7 +1467,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "silentdragonlitelib"
|
name = "silentdragonlitelib"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/DenioD/silentdragonlite-cli?rev=3a74fda1da22f35da8dc5973eb782338899810cb#3a74fda1da22f35da8dc5973eb782338899810cb"
|
source = "git+https://github.com/DenioD/silentdragonlite-cli?rev=89ee34ba526d9d45a72787b07af9407bd96a337c#89ee34ba526d9d45a72787b07af9407bd96a337c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"base58 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"bellman 0.1.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)",
|
"bellman 0.1.0 (git+https://github.com/DenioD/librustzcash.git?rev=caaee693c47c2ee9ecd1e1546b8fe3c714f342bc)",
|
||||||
@@ -2481,7 +2481,7 @@ dependencies = [
|
|||||||
"checksum serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)" = "2f72eb2a68a7dc3f9a691bfda9305a1c017a6215e5a4545c258500d2099a37c2"
|
"checksum serde_json 1.0.41 (registry+https://github.com/rust-lang/crates.io-index)" = "2f72eb2a68a7dc3f9a691bfda9305a1c017a6215e5a4545c258500d2099a37c2"
|
||||||
"checksum serde_yaml 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)" = "691b17f19fc1ec9d94ec0b5864859290dff279dbd7b03f017afda54eb36c3c35"
|
"checksum serde_yaml 0.8.11 (registry+https://github.com/rust-lang/crates.io-index)" = "691b17f19fc1ec9d94ec0b5864859290dff279dbd7b03f017afda54eb36c3c35"
|
||||||
"checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d"
|
"checksum sha2 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b4d8bfd0e469f417657573d8451fb33d16cfe0989359b93baf3a1ffc639543d"
|
||||||
"checksum silentdragonlitelib 0.1.0 (git+https://github.com/DenioD/silentdragonlite-cli?rev=3a74fda1da22f35da8dc5973eb782338899810cb)" = "<none>"
|
"checksum silentdragonlitelib 0.1.0 (git+https://github.com/DenioD/silentdragonlite-cli?rev=89ee34ba526d9d45a72787b07af9407bd96a337c)" = "<none>"
|
||||||
"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
|
"checksum slab 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8"
|
||||||
"checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7"
|
"checksum smallvec 0.6.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ab606a9c5e214920bb66c458cd7be8ef094f813f20fe77a54cc7dbfff220d4b7"
|
||||||
"checksum sodiumoxide 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585232e78a4fc18133eef9946d3080befdf68b906c51b621531c37e91787fa2b"
|
"checksum sodiumoxide 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585232e78a4fc18133eef9946d3080befdf68b906c51b621531c37e91787fa2b"
|
||||||
|
|||||||
@@ -11,4 +11,4 @@ crate-type = ["staticlib"]
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
libc = "0.2.58"
|
libc = "0.2.58"
|
||||||
lazy_static = "1.4.0"
|
lazy_static = "1.4.0"
|
||||||
silentdragonlitelib = { git = "https://github.com/DenioD/silentdragonlite-cli", rev = "3a74fda1da22f35da8dc5973eb782338899810cb" }
|
silentdragonlitelib = { git = "https://github.com/DenioD/silentdragonlite-cli", rev = "89ee34ba526d9d45a72787b07af9407bd96a337c" }
|
||||||
|
|||||||
BIN
silentdragonlite
Executable file
BIN
silentdragonlite
Executable file
Binary file not shown.
@@ -51,10 +51,16 @@ 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."));
|
||||||
litelib_initialize_existing(config->dangerous, config->server.toStdString().c_str());
|
createOrRestore(config->dangerous, config->server);
|
||||||
d->show();
|
d->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -336,7 +336,7 @@ void Controller::refreshTransactions() {
|
|||||||
|
|
||||||
for (auto& it : reply.get<json::array_t>()) {
|
for (auto& it : reply.get<json::array_t>()) {
|
||||||
QString address;
|
QString address;
|
||||||
double total_amount;
|
quint64 total_amount;
|
||||||
QList<TransactionItemDetail> items;
|
QList<TransactionItemDetail> items;
|
||||||
|
|
||||||
// First, check if there's outgoing metadata
|
// First, check if there's outgoing metadata
|
||||||
@@ -346,10 +346,13 @@ void Controller::refreshTransactions() {
|
|||||||
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_float_t>() /100000000; // Sent items are -ve
|
||||||
|
|
||||||
|
// Check for Memos
|
||||||
|
|
||||||
QString memo;
|
QString memo;
|
||||||
if (!o["memo"].is_null()) {
|
if (!o["memo"].is_null()) {
|
||||||
memo = QString::fromStdString(o["memo"]);
|
memo = QString::fromStdString(o["memo"]);
|
||||||
}
|
|
||||||
|
}
|
||||||
|
|
||||||
items.push_back(TransactionItemDetail{address, amount, memo});
|
items.push_back(TransactionItemDetail{address, amount, memo});
|
||||||
total_amount += amount;
|
total_amount += amount;
|
||||||
@@ -380,6 +383,7 @@ void Controller::refreshTransactions() {
|
|||||||
""
|
""
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
TransactionItem tx{
|
TransactionItem tx{
|
||||||
"Receive",
|
"Receive",
|
||||||
it["datetime"].get<json::number_unsigned_t>(),
|
it["datetime"].get<json::number_unsigned_t>(),
|
||||||
|
|||||||
@@ -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));
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
|
|
||||||
|
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
logger = new Logger(this, QDir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)).filePath("./komodo/HUSH3/silentdragonlite-debug.log"));
|
logger = new Logger(this, QDir(QStandardPaths::writableLocation(QStandardPaths::AppDataLocation)).filePath("silentdragonlite-cli-wallet.log"));
|
||||||
|
|
||||||
// Status Bar
|
// Status Bar
|
||||||
setupStatusBar();
|
setupStatusBar();
|
||||||
|
|||||||
@@ -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" />
|
||||||
|
|||||||
@@ -313,7 +313,7 @@ bool Settings::removeFromhushConf(QString confLocation, QString option) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
double Settings::getMinerFee() {
|
double Settings::getMinerFee() {
|
||||||
return 0.01;
|
return 0.0001;
|
||||||
}
|
}
|
||||||
|
|
||||||
double Settings::getZboardAmount() {
|
double Settings::getZboardAmount() {
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user