more branding, some fixes
This commit is contained in:
@@ -18,10 +18,10 @@ script:
|
||||
- qmake -v
|
||||
- clang++ -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 distclean
|
||||
- qmake hush-qt-wallet.pro CONFIG+=release -spec linux-g++
|
||||
- qmake silentdragon-lite.pro CONFIG+=release -spec linux-g++
|
||||
- res/libsodium/buildlibsodium.sh
|
||||
- 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>
|
||||
</qresource>
|
||||
<qresource prefix="/translations">
|
||||
<file>res/zec_qt_wallet_es.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>
|
||||
<file>res/zec_qt_wallet_de.qm</file>
|
||||
</qresource>
|
||||
<qresource prefix="/css">
|
||||
<file>res/css/blue.css</file>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
extern "C" {
|
||||
#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_execute (const char* s, const char* args);
|
||||
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 (config, _latest_block_height) = match LightClientConfig::create(server, dangerous) {
|
||||
let (config, latest_block_height) = match LightClientConfig::create(server, dangerous) {
|
||||
Ok((c, h)) => (c, h),
|
||||
Err(e) => {
|
||||
let e_str = CString::new(format!("Error: {}", e)).unwrap();
|
||||
@@ -39,7 +39,7 @@ pub extern fn litelib_initialze_existing(dangerous: bool, server: *const c_char)
|
||||
};
|
||||
|
||||
|
||||
let lightclient = match LightClient::read_from_disk(&config) {
|
||||
let lightclient = match LightClient::read_from_disk(&config) {
|
||||
Ok(l) => l,
|
||||
Err(e) => {
|
||||
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>
|
||||
<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>
|
||||
</message>
|
||||
<message>
|
||||
@@ -228,17 +228,17 @@
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="891"/>
|
||||
<source>Block height</source>
|
||||
<source>Blockheight</source>
|
||||
<translation type="unfinished">YOUR_TRANSLATION_HERE</translation>
|
||||
</message>
|
||||
<message>
|
||||
<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>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainwindow.ui" line="912"/>
|
||||
<source>Connections</source>
|
||||
<source>Vendor</source>
|
||||
<translation type="unfinished">YOUR_TRANSLATION_HERE</translation>
|
||||
</message>
|
||||
<message>
|
||||
@@ -659,7 +659,7 @@ Not starting embedded hushd because --no-embedded was passed</source>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/rpc.cpp" line="578"/>
|
||||
<source>Block height</source>
|
||||
<source>Blockheight</source>
|
||||
<translation type="unfinished">YOUR_TRANSLATION_HERE</translation>
|
||||
</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
@@ -115,6 +115,7 @@ TRANSLATIONS = res/zec_qt_wallet_es.ts \
|
||||
res/zec_qt_wallet_it.ts \
|
||||
res/zec_qt_wallet_zh.ts \
|
||||
res/zec_qt_wallet_tr.ts
|
||||
|
||||
|
||||
include(singleapplication/singleapplication.pri)
|
||||
DEFINES += QAPPLICATION_CLASS=QApplication
|
||||
|
||||
BIN
silentdragonlite
Executable file
BIN
silentdragonlite
Executable file
Binary file not shown.
@@ -508,11 +508,12 @@ void Controller::refreshhushPrice() {
|
||||
if (!zrpc->haveConnection())
|
||||
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");
|
||||
|
||||
|
||||
QNetworkRequest req;
|
||||
req.setUrl(cmcURL);
|
||||
|
||||
|
||||
QNetworkAccessManager *manager = new QNetworkAccessManager(this->main);
|
||||
QNetworkReply *reply = manager->get(req);
|
||||
|
||||
@@ -524,34 +525,41 @@ void Controller::refreshhushPrice() {
|
||||
if (reply->error() != QNetworkReply::NoError) {
|
||||
auto parsed = json::parse(reply->readAll(), nullptr, false);
|
||||
if (!parsed.is_discarded() && !parsed["error"]["message"].is_null()) {
|
||||
qDebug() << QString::fromStdString(parsed["error"]["message"]);
|
||||
qDebug() << QString::fromStdString(parsed["error"]["message"]);
|
||||
} else {
|
||||
qDebug() << reply->errorString();
|
||||
}
|
||||
Settings::getInstance()->sethushPrice(0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
qDebug() << "No network errors";
|
||||
auto all = reply->readAll();
|
||||
|
||||
auto parsed = json::parse(all, nullptr, false);
|
||||
if (parsed.is_discarded()) {
|
||||
Settings::getInstance()->sethushPrice(0);
|
||||
return;
|
||||
}
|
||||
|
||||
for (const json& item : parsed.get<json::array_t>()) {
|
||||
if (item["symbol"].get<json::string_t>() == Settings::getTokenName().toStdString()) {
|
||||
QString price = QString::fromStdString(item["price_usd"].get<json::string_t>());
|
||||
qDebug() << Settings::getTokenName() << " Price=" << price;
|
||||
Settings::getInstance()->sethushPrice(price.toDouble());
|
||||
qDebug() << "Parsed JSON";
|
||||
|
||||
return;
|
||||
}
|
||||
const json& item = parsed.get<json::object_t>();
|
||||
const json& hush = item["hush"].get<json::object_t>();
|
||||
|
||||
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;
|
||||
} else {
|
||||
qDebug() << "No hush key found in JSON! API might be down or we are rate-limited\n";
|
||||
}
|
||||
} catch (...) {
|
||||
} catch (const std::exception& e) {
|
||||
// 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;
|
||||
|
||||
@@ -39,7 +39,7 @@ void LiteInterface::createNewZaddr(bool, const std::function<void(json)>& cb) {
|
||||
if (conn == nullptr)
|
||||
return;
|
||||
|
||||
conn->doRPCWithDefaultErrorHandling("new", "zs", cb);
|
||||
conn->doRPCWithDefaultErrorHandling("new", "zs1", cb);
|
||||
}
|
||||
|
||||
void LiteInterface::createNewTaddr(const std::function<void(json)>& cb) {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
<number>4</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
@@ -935,7 +935,7 @@
|
||||
<item row="5" column="0" colspan="3">
|
||||
<widget class="QLabel" name="label_14">
|
||||
<property name="text">
|
||||
<string>You are currently not mining</string>
|
||||
<string>This is a Lightwallet, you cant mine with it!</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -953,7 +953,7 @@
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QLabel" name="numconnections">
|
||||
<widget class="QLabel" name="version">
|
||||
<property name="text">
|
||||
<string>Loading...</string>
|
||||
</property>
|
||||
@@ -962,12 +962,12 @@
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="heightLabel">
|
||||
<property name="text">
|
||||
<string>Block height</string>
|
||||
<string>Blockheight</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="2">
|
||||
<widget class="QLabel" name="solrate">
|
||||
<widget class="QLabel" name="Vendor">
|
||||
<property name="text">
|
||||
<string>Loading...</string>
|
||||
</property>
|
||||
@@ -976,19 +976,19 @@
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
<string>Network solution rate</string>
|
||||
<string>Version hushd light</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_8">
|
||||
<property name="text">
|
||||
<string>Connections</string>
|
||||
<string>Vendor</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QLabel" name="blockheight">
|
||||
<widget class="QLabel" name="blockHeight">
|
||||
<property name="text">
|
||||
<string>Loading...</string>
|
||||
</property>
|
||||
@@ -1122,17 +1122,17 @@
|
||||
<property name="text">
|
||||
<string>&Send Duke Feedback</string>
|
||||
</property>
|
||||
</action>
|
||||
</action>
|
||||
<action name="actionDiscord">
|
||||
<property name="text">
|
||||
<string>&Hush Discord</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionWebsite">
|
||||
</action>
|
||||
<action name="actionWebsite">
|
||||
<property name="text">
|
||||
<string>&Hush Website</string>
|
||||
</property>
|
||||
</action>
|
||||
</action>
|
||||
<action name="actionCheck_for_Updates">
|
||||
<property name="text">
|
||||
<string>Check github.com for &updates</string>
|
||||
|
||||
Reference in New Issue
Block a user