more branding, some fixes
This commit is contained in:
@@ -18,10 +18,10 @@ script:
|
|||||||
- qmake -v
|
- qmake -v
|
||||||
- clang++ -v
|
- clang++ -v
|
||||||
- g++-8 -v
|
- g++-8 -v
|
||||||
- qmake hush-qt-wallet.pro CONFIG+=release -spec linux-clang
|
- qmake silentdragon-lite.pro CONFIG+=release -spec linux-clang
|
||||||
- make CC=clang CXX=clang++ -j2
|
- make CC=clang CXX=clang++ -j2
|
||||||
- make distclean
|
- make distclean
|
||||||
- qmake hush-qt-wallet.pro CONFIG+=release -spec linux-g++
|
- qmake silentdragon-lite.pro CONFIG+=release -spec linux-g++
|
||||||
- res/libsodium/buildlibsodium.sh
|
- res/libsodium/buildlibsodium.sh
|
||||||
- make CC=gcc-8 CXX=g++-8 -j2
|
- make CC=gcc-8 CXX=g++-8 -j2
|
||||||
|
|
||||||
|
|||||||
1
OKtadP.json
Normal file
1
OKtadP.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
[{"excluded":[],"includePaths":["/home/denio/silentdragon-lite/src/3rdparty","/home/denio/silentdragon-lite/src","/home/denio/silentdragon-lite/singleapplication","/home/denio/silentdragon-lite/res","/home/denio/Qt5.13.1/5.13.1/gcc_64/include","/home/denio/Qt5.13.1/5.13.1/gcc_64/include/QtWidgets","/home/denio/Qt5.13.1/5.13.1/gcc_64/include/QtGui","/home/denio/Qt5.13.1/5.13.1/gcc_64/include/QtWebSockets","/home/denio/Qt5.13.1/5.13.1/gcc_64/include/QtNetwork","/home/denio/Qt5.13.1/5.13.1/gcc_64/include/QtCore","/home/denio/silentdragon-lite/bin","/usr/include/libdrm","/home/denio/silentdragon-lite/src"],"projectFile":"/home/denio/silentdragon-lite/silentdragon-lite.pro","sources":["/home/denio/silentdragon-lite/lib/silentdragonlitelib.h","/home/denio/silentdragon-lite/singleapplication/singleapplication.cpp","/home/denio/silentdragon-lite/singleapplication/singleapplication.h","/home/denio/silentdragon-lite/singleapplication/singleapplication_p.cpp","/home/denio/silentdragon-lite/singleapplication/singleapplication_p.h","/home/denio/silentdragon-lite/src/3rdparty/json/json.hpp","/home/denio/silentdragon-lite/src/3rdparty/qrcode/BitBuffer.cpp","/home/denio/silentdragon-lite/src/3rdparty/qrcode/BitBuffer.hpp","/home/denio/silentdragon-lite/src/3rdparty/qrcode/QrCode.cpp","/home/denio/silentdragon-lite/src/3rdparty/qrcode/QrCode.hpp","/home/denio/silentdragon-lite/src/3rdparty/qrcode/QrSegment.cpp","/home/denio/silentdragon-lite/src/3rdparty/qrcode/QrSegment.hpp","/home/denio/silentdragon-lite/src/about.ui","/home/denio/silentdragon-lite/src/addressbook.cpp","/home/denio/silentdragon-lite/src/addressbook.h","/home/denio/silentdragon-lite/src/addressbook.ui","/home/denio/silentdragon-lite/src/addresscombo.cpp","/home/denio/silentdragon-lite/src/addresscombo.h","/home/denio/silentdragon-lite/src/balancestablemodel.cpp","/home/denio/silentdragon-lite/src/balancestablemodel.h","/home/denio/silentdragon-lite/src/confirm.ui","/home/denio/silentdragon-lite/src/connection.cpp","/home/denio/silentdragon-lite/src/connection.h","/home/denio/silentdragon-lite/src/connection.ui","/home/denio/silentdragon-lite/src/controller.cpp","/home/denio/silentdragon-lite/src/controller.h","/home/denio/silentdragon-lite/src/createhushconfdialog.ui","/home/denio/silentdragon-lite/src/datamodel.cpp","/home/denio/silentdragon-lite/src/datamodel.h","/home/denio/silentdragon-lite/src/fillediconlabel.cpp","/home/denio/silentdragon-lite/src/fillediconlabel.h","/home/denio/silentdragon-lite/src/liteinterface.cpp","/home/denio/silentdragon-lite/src/liteinterface.h","/home/denio/silentdragon-lite/src/logger.cpp","/home/denio/silentdragon-lite/src/logger.h","/home/denio/silentdragon-lite/src/main.cpp","/home/denio/silentdragon-lite/src/mainwindow.cpp","/home/denio/silentdragon-lite/src/mainwindow.h","/home/denio/silentdragon-lite/src/mainwindow.ui","/home/denio/silentdragon-lite/src/memodialog.ui","/home/denio/silentdragon-lite/src/memoedit.cpp","/home/denio/silentdragon-lite/src/memoedit.h","/home/denio/silentdragon-lite/src/migration.ui","/home/denio/silentdragon-lite/src/mobileappconnector.cpp","/home/denio/silentdragon-lite/src/mobileappconnector.h","/home/denio/silentdragon-lite/src/mobileappconnector.ui","/home/denio/silentdragon-lite/src/newrecurring.ui","/home/denio/silentdragon-lite/src/precompiled.h","/home/denio/silentdragon-lite/src/privkey.ui","/home/denio/silentdragon-lite/src/qrcodelabel.cpp","/home/denio/silentdragon-lite/src/qrcodelabel.h","/home/denio/silentdragon-lite/src/recurring.cpp","/home/denio/silentdragon-lite/src/recurring.h","/home/denio/silentdragon-lite/src/recurringdialog.ui","/home/denio/silentdragon-lite/src/recurringmultiple.ui","/home/denio/silentdragon-lite/src/recurringpayments.ui","/home/denio/silentdragon-lite/src/requestdialog.cpp","/home/denio/silentdragon-lite/src/requestdialog.h","/home/denio/silentdragon-lite/src/requestdialog.ui","/home/denio/silentdragon-lite/src/sendtab.cpp","/home/denio/silentdragon-lite/src/settings.cpp","/home/denio/silentdragon-lite/src/settings.h","/home/denio/silentdragon-lite/src/settings.ui","/home/denio/silentdragon-lite/src/txtablemodel.cpp","/home/denio/silentdragon-lite/src/txtablemodel.h","/home/denio/silentdragon-lite/src/viewalladdresses.cpp","/home/denio/silentdragon-lite/src/viewalladdresses.h","/home/denio/silentdragon-lite/src/viewalladdresses.ui","/home/denio/silentdragon-lite/src/websockets.cpp","/home/denio/silentdragon-lite/src/websockets.h"],"translations":["/home/denio/silentdragon-lite/res/zec_qt_wallet_es.ts","/home/denio/silentdragon-lite/res/zec_qt_wallet_fr.ts","/home/denio/silentdragon-lite/res/zec_qt_wallet_de.ts","/home/denio/silentdragon-lite/res/zec_qt_wallet_pt.ts","/home/denio/silentdragon-lite/res/zec_qt_wallet_it.ts","/home/denio/silentdragon-lite/res/zec_qt_wallet_zh.ts","/home/denio/silentdragon-lite/res/zec_qt_wallet_tr.ts","/home/denio/silentdragon-lite/res/zec_qt_wallet_template.ts"]}]
|
||||||
@@ -13,12 +13,7 @@
|
|||||||
<file>res/logobig.gif</file>
|
<file>res/logobig.gif</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/translations">
|
<qresource prefix="/translations">
|
||||||
<file>res/zec_qt_wallet_es.qm</file>
|
<file>res/zec_qt_wallet_de.qm</file>
|
||||||
<file>res/zec_qt_wallet_fr.qm</file>
|
|
||||||
<file>res/zec_qt_wallet_pt.qm</file>
|
|
||||||
<file>res/zec_qt_wallet_it.qm</file>
|
|
||||||
<file>res/zec_qt_wallet_zh.qm</file>
|
|
||||||
<file>res/zec_qt_wallet_tr.qm</file>
|
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/css">
|
<qresource prefix="/css">
|
||||||
<file>res/css/blue.css</file>
|
<file>res/css/blue.css</file>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern bool litelib_wallet_exists (const char* chain_name, const char* dir);
|
extern bool litelib_wallet_exists (const char* chain_name);
|
||||||
extern char * litelib_initialze_existing (bool dangerous, const char* server);
|
extern char * litelib_initialze_existing (bool dangerous, const char* server);
|
||||||
extern char * litelib_execute (const char* s, const char* args);
|
extern char * litelib_execute (const char* s, const char* args);
|
||||||
extern void litelib_rust_free_string (char* s);
|
extern void litelib_rust_free_string (char* s);
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ pub extern fn litelib_initialze_existing(dangerous: bool, server: *const c_char)
|
|||||||
};
|
};
|
||||||
|
|
||||||
let server = LightClientConfig::get_server_or_default(Some(server_str));
|
let server = LightClientConfig::get_server_or_default(Some(server_str));
|
||||||
let (config, _latest_block_height) = match LightClientConfig::create(server, dangerous) {
|
let (config, latest_block_height) = match LightClientConfig::create(server, dangerous) {
|
||||||
Ok((c, h)) => (c, h),
|
Ok((c, h)) => (c, h),
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
let e_str = CString::new(format!("Error: {}", e)).unwrap();
|
let e_str = CString::new(format!("Error: {}", e)).unwrap();
|
||||||
|
|||||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
2162
res/zec_qt_wallet_pot.ts
Normal file
2162
res/zec_qt_wallet_pot.ts
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
BIN
res/zec_qt_wallet_template.qm
Normal file
BIN
res/zec_qt_wallet_template.qm
Normal file
Binary file not shown.
@@ -215,7 +215,7 @@
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/mainwindow.ui" line="864"/>
|
<location filename="../src/mainwindow.ui" line="864"/>
|
||||||
<source>You are currently not mining</source>
|
<source>This is a Lightwallet, you cant mine with it! not mining</source>
|
||||||
<translation type="unfinished">YOUR_TRANSLATION_HERE</translation>
|
<translation type="unfinished">YOUR_TRANSLATION_HERE</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
@@ -233,12 +233,12 @@
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/mainwindow.ui" line="905"/>
|
<location filename="../src/mainwindow.ui" line="905"/>
|
||||||
<source>Network solution rate</source>
|
<source>Version hushd light rate</source>
|
||||||
<translation type="unfinished">YOUR_TRANSLATION_HERE</translation>
|
<translation type="unfinished">YOUR_TRANSLATION_HERE</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/mainwindow.ui" line="912"/>
|
<location filename="../src/mainwindow.ui" line="912"/>
|
||||||
<source>Connections</source>
|
<source>Vendor</source>
|
||||||
<translation type="unfinished">YOUR_TRANSLATION_HERE</translation>
|
<translation type="unfinished">YOUR_TRANSLATION_HERE</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
|
|||||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -116,6 +116,7 @@ TRANSLATIONS = res/zec_qt_wallet_es.ts \
|
|||||||
res/zec_qt_wallet_zh.ts \
|
res/zec_qt_wallet_zh.ts \
|
||||||
res/zec_qt_wallet_tr.ts
|
res/zec_qt_wallet_tr.ts
|
||||||
|
|
||||||
|
|
||||||
include(singleapplication/singleapplication.pri)
|
include(singleapplication/singleapplication.pri)
|
||||||
DEFINES += QAPPLICATION_CLASS=QApplication
|
DEFINES += QAPPLICATION_CLASS=QApplication
|
||||||
|
|
||||||
|
|||||||
BIN
silentdragonlite
Executable file
BIN
silentdragonlite
Executable file
Binary file not shown.
@@ -508,6 +508,7 @@ void Controller::refreshhushPrice() {
|
|||||||
if (!zrpc->haveConnection())
|
if (!zrpc->haveConnection())
|
||||||
return noConnection();
|
return noConnection();
|
||||||
|
|
||||||
|
// TODO: use/render all this data
|
||||||
QUrl cmcURL("https://api.coingecko.com/api/v3/simple/price?ids=hush&vs_currencies=btc%2Cusd%2Ceur&include_market_cap=true&include_24hr_vol=true&include_24hr_change=true");
|
QUrl cmcURL("https://api.coingecko.com/api/v3/simple/price?ids=hush&vs_currencies=btc%2Cusd%2Ceur&include_market_cap=true&include_24hr_vol=true&include_24hr_change=true");
|
||||||
|
|
||||||
QNetworkRequest req;
|
QNetworkRequest req;
|
||||||
@@ -532,26 +533,33 @@ void Controller::refreshhushPrice() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qDebug() << "No network errors";
|
||||||
auto all = reply->readAll();
|
auto all = reply->readAll();
|
||||||
|
|
||||||
auto parsed = json::parse(all, nullptr, false);
|
auto parsed = json::parse(all, nullptr, false);
|
||||||
if (parsed.is_discarded()) {
|
if (parsed.is_discarded()) {
|
||||||
Settings::getInstance()->sethushPrice(0);
|
Settings::getInstance()->sethushPrice(0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const json& item : parsed.get<json::array_t>()) {
|
qDebug() << "Parsed JSON";
|
||||||
if (item["symbol"].get<json::string_t>() == Settings::getTokenName().toStdString()) {
|
|
||||||
QString price = QString::fromStdString(item["price_usd"].get<json::string_t>());
|
const json& item = parsed.get<json::object_t>();
|
||||||
qDebug() << Settings::getTokenName() << " Price=" << price;
|
const json& hush = item["hush"].get<json::object_t>();
|
||||||
Settings::getInstance()->sethushPrice(price.toDouble());
|
|
||||||
|
if (hush["usd"] >= 0) {
|
||||||
|
qDebug() << "Found hush key in price json";
|
||||||
|
// TODO: support BTC/EUR prices as well
|
||||||
|
QString price = QString::fromStdString(hush["usd"].get<json::string_t>());
|
||||||
|
qDebug() << "HUSH = $" << QString::number((double)hush["usd"]);
|
||||||
|
Settings::getInstance()->sethushPrice( hush["usd"] );
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
} else {
|
||||||
|
qDebug() << "No hush key found in JSON! API might be down or we are rate-limited\n";
|
||||||
}
|
}
|
||||||
}
|
} catch (const std::exception& e) {
|
||||||
} catch (...) {
|
|
||||||
// If anything at all goes wrong, just set the price to 0 and move on.
|
// If anything at all goes wrong, just set the price to 0 and move on.
|
||||||
qDebug() << QString("Caught something nasty");
|
qDebug() << QString("Caught something nasty: ") << e.what();
|
||||||
}
|
}
|
||||||
|
|
||||||
// If nothing, then set the price to 0;
|
// If nothing, then set the price to 0;
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ void LiteInterface::createNewZaddr(bool, const std::function<void(json)>& cb) {
|
|||||||
if (conn == nullptr)
|
if (conn == nullptr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
conn->doRPCWithDefaultErrorHandling("new", "zs", cb);
|
conn->doRPCWithDefaultErrorHandling("new", "zs1", cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LiteInterface::createNewTaddr(const std::function<void(json)>& cb) {
|
void LiteInterface::createNewTaddr(const std::function<void(json)>& cb) {
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>2</number>
|
<number>4</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab">
|
<widget class="QWidget" name="tab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@@ -935,7 +935,7 @@
|
|||||||
<item row="5" column="0" colspan="3">
|
<item row="5" column="0" colspan="3">
|
||||||
<widget class="QLabel" name="label_14">
|
<widget class="QLabel" name="label_14">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>You are currently not mining</string>
|
<string>This is a Lightwallet, you cant mine with it!</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -953,7 +953,7 @@
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="2">
|
<item row="2" column="2">
|
||||||
<widget class="QLabel" name="numconnections">
|
<widget class="QLabel" name="version">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Loading...</string>
|
<string>Loading...</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -967,7 +967,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="2">
|
<item row="3" column="2">
|
||||||
<widget class="QLabel" name="solrate">
|
<widget class="QLabel" name="Vendor">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Loading...</string>
|
<string>Loading...</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -976,19 +976,19 @@
|
|||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="label_12">
|
<widget class="QLabel" name="label_12">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Network solution rate</string>
|
<string>Version hushd light</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="label_8">
|
<widget class="QLabel" name="label_8">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Connections</string>
|
<string>Vendor</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="2">
|
<item row="1" column="2">
|
||||||
<widget class="QLabel" name="blockheight">
|
<widget class="QLabel" name="blockHeight">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Loading...</string>
|
<string>Loading...</string>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
Reference in New Issue
Block a user