Browse Source

Merge remote-tracking branch 'origin/duke' into duke

pull/140/head
Duke Leto 5 years ago
parent
commit
bac10805e6
  1. 6
      application.qrc
  2. BIN
      res/zec_qt_wallet_de.qm
  3. 407
      res/zec_qt_wallet_de.ts
  4. BIN
      res/zec_qt_wallet_es.qm
  5. 405
      res/zec_qt_wallet_es.ts
  6. 590
      res/zec_qt_wallet_fi.ts
  7. BIN
      res/zec_qt_wallet_fr.qm
  8. 405
      res/zec_qt_wallet_fr.ts
  9. 1889
      res/zec_qt_wallet_hr.ts
  10. BIN
      res/zec_qt_wallet_it.qm
  11. 405
      res/zec_qt_wallet_it.ts
  12. 2816
      res/zec_qt_wallet_nl.ts
  13. BIN
      res/zec_qt_wallet_pt.qm
  14. 405
      res/zec_qt_wallet_pt.ts
  15. BIN
      res/zec_qt_wallet_ru.qm
  16. 429
      res/zec_qt_wallet_ru.ts
  17. BIN
      res/zec_qt_wallet_tr.qm
  18. 405
      res/zec_qt_wallet_tr.ts
  19. BIN
      res/zec_qt_wallet_uk.qm
  20. 421
      res/zec_qt_wallet_uk.ts
  21. BIN
      res/zec_qt_wallet_zh.qm
  22. 405
      res/zec_qt_wallet_zh.ts
  23. 14
      silentdragon.pro
  24. 18
      src/connection.cpp
  25. 1
      src/scripts/mkmacdmg.sh
  26. 16
      src/websockets.cpp

6
application.qrc

@ -17,12 +17,14 @@
<file>res/zec_qt_wallet_es.qm</file>
<file>res/zec_qt_wallet_fi.qm</file>
<file>res/zec_qt_wallet_fr.qm</file>
<file>res/zec_qt_wallet_pt.qm</file>
<file>res/zec_qt_wallet_hr.qm</file>
<file>res/zec_qt_wallet_it.qm</file>
<file>res/zec_qt_wallet_zh.qm</file>
<file>res/zec_qt_wallet_nl.qm</file>
<file>res/zec_qt_wallet_pt.qm</file>
<file>res/zec_qt_wallet_ru.qm</file>
<file>res/zec_qt_wallet_tr.qm</file>
<file>res/zec_qt_wallet_uk.qm</file>
<file>res/zec_qt_wallet_zh.qm</file>
</qresource>
<qresource prefix="/css">
<file>res/css/blue.css</file>

BIN
res/zec_qt_wallet_de.qm

Binary file not shown.

407
res/zec_qt_wallet_de.ts

File diff suppressed because it is too large

BIN
res/zec_qt_wallet_es.qm

Binary file not shown.

405
res/zec_qt_wallet_es.ts

File diff suppressed because it is too large

590
res/zec_qt_wallet_fi.ts

File diff suppressed because it is too large

BIN
res/zec_qt_wallet_fr.qm

Binary file not shown.

405
res/zec_qt_wallet_fr.ts

File diff suppressed because it is too large

1889
res/zec_qt_wallet_hr.ts

File diff suppressed because it is too large

BIN
res/zec_qt_wallet_it.qm

Binary file not shown.

405
res/zec_qt_wallet_it.ts

File diff suppressed because it is too large

2816
res/zec_qt_wallet_nl.ts

File diff suppressed because it is too large

BIN
res/zec_qt_wallet_pt.qm

Binary file not shown.

405
res/zec_qt_wallet_pt.ts

File diff suppressed because it is too large

BIN
res/zec_qt_wallet_ru.qm

Binary file not shown.

429
res/zec_qt_wallet_ru.ts

File diff suppressed because it is too large

BIN
res/zec_qt_wallet_tr.qm

Binary file not shown.

405
res/zec_qt_wallet_tr.ts

File diff suppressed because it is too large

BIN
res/zec_qt_wallet_uk.qm

Binary file not shown.

421
res/zec_qt_wallet_uk.ts

File diff suppressed because it is too large

BIN
res/zec_qt_wallet_zh.qm

Binary file not shown.

405
res/zec_qt_wallet_zh.ts

File diff suppressed because it is too large

14
silentdragon.pro

@ -106,16 +106,18 @@ FORMS += \
src/requestdialog.ui
TRANSLATIONS = res/zec_qt_wallet_es.ts \
TRANSLATIONS = res/zec_qt_wallet_de.ts \
res/zec_qt_wallet_es.ts \
res/zec_qt_wallet_fi.ts \
res/zec_qt_wallet_fr.ts \
res/zec_qt_wallet_de.ts \
res/zec_qt_wallet_pt.ts \
res/zec_qt_wallet_hr.ts \
res/zec_qt_wallet_it.ts \
res/zec_qt_wallet_zh.ts \
res/zec_qt_wallet_tr.ts \
res/zec_qt_wallet_nl.ts \
res/zec_qt_wallet_pt.ts \
res/zec_qt_wallet_ru.ts \
res/zec_qt_wallet_uk.ts
res/zec_qt_wallet_tr.ts \
res/zec_qt_wallet_uk.ts \
res/zec_qt_wallet_zh.ts
include(singleapplication/singleapplication.pri)
DEFINES += QAPPLICATION_CLASS=QApplication

18
src/connection.cpp

@ -215,13 +215,13 @@ void ConnectionLoader::createZcashConf() {
}
void ConnectionLoader::downloadParams(std::function<void(void)> cb) {
void ConnectionLoader::downloadParams(std::function<void(void)> cb) {
main->logger->write("Adding params to download queue");
// Add all the files to the download queue
downloadQueue = new QQueue<QUrl>();
client = new QNetworkAccessManager(main);
//TODO: we never execute this
//Currently we fallback to this in rare edgecases, it's not normally executed
downloadQueue->enqueue(QUrl("https://z.cash/downloads/sapling-output.params"));
downloadQueue->enqueue(QUrl("https://z.cash/downloads/sapling-spend.params"));
@ -590,8 +590,6 @@ bool ConnectionLoader::verifyParams() {
QDir paramsDir(zcashParamsDir());
// TODO: better error reporting if only 1 file exists or is missing
// TODO: do a basic size check, to filter out partial downloads and corrupt
// files from full HD's and other weird stuff
qDebug() << "Verifying sapling param files exist";
@ -611,9 +609,15 @@ bool ConnectionLoader::verifyParams() {
return true;
}
// this is to support hushd inside a .dmg file, where the binaries are not at the root directory, but they are executed from the root dir of the .dmg
if( QFile( QDir("..").filePath("Contents/MacOS/sapling-output.params") ).exists() && QFile( QDir("..").filePath("Contents/MacOS/hush3/sapling-spend.params") ).exists() ) {
qDebug() << "Found params in ../Contents/MacOS";
// this is to support SD on mac in /Applications1
if( QFile( QDir("/Applications").filePath("silentdragon.app/Contents/MacOS/sapling-output.params") ).exists() && QFile( QDir("/Applications").filePath("./silentdragon.app/Contents/MacOS/sapling-spend.params") ).exists() ) {
qDebug() << "Found params in /Applications/silentdragon.app/Contents/MacOS";
return true;
}
// this is to support SD on mac inside a DMG
if( QFile( QDir("./").filePath("silentdragon.app/Contents/MacOS/sapling-output.params") ).exists() && QFile( QDir("./").filePath("./silentdragon.app/Contents/MacOS/sapling-spend.params") ).exists() ) {
qDebug() << "Found params in ./silentdragon.app/Contents/MacOS";
return true;
}

1
src/scripts/mkmacdmg.sh

@ -106,7 +106,6 @@ echo "[OK]"
# xcrun stapler staple macOS-zecwallet-v0.8.0.dmg
echo -n "Building dmg..........."
<<<<<<< HEAD
mv silentdragon.app silentdragon.app
create-dmg --volname "silentdragon-v$APP_VERSION" --volicon "res/logo.icns" --window-pos 200 120 --icon "silentdragon.app" 200 190 --app-drop-link 600 185 --hide-extension "silentdragon.app" --window-size 800 400 --hdiutil-quiet --background res/dmgbg.png artifacts/macOS-silentdragon-v$APP_VERSION.dmg silentdragon.app >/dev/null 2>&1

16
src/websockets.cpp

@ -211,14 +211,18 @@ void WormholeClient::onConnected()
qDebug() << "Created QTimer";
QObject::connect(timer, &QTimer::timeout, [=]() {
qDebug() << "Timer timeout!";
if (!shuttingDown && m_webSocket && m_webSocket->isValid()) {
auto payload = QJsonDocument(QJsonObject { {"ping", "ping"} }).toJson();
qint64 bytes = m_webSocket->sendTextMessage(payload);
qDebug() << "Sent ping, " << bytes << " bytes";
try {
if (!shuttingDown && m_webSocket && m_webSocket->isValid()) {
auto payload = QJsonDocument(QJsonObject { {"ping", "ping"} }).toJson();
qint64 bytes = m_webSocket->sendTextMessage(payload);
qDebug() << "Sent ping, " << bytes << " bytes";
}
} catch (...) {
qDebug() << "Websocket is invalid, no ping sent!";
}
});
unsigned int interval = 4*60*1000;
timer->start(interval); // 4 minutes
unsigned int interval = 1*60*1000; // 1 minute
timer->start(interval);
qDebug() << "Started timer with interval=" << interval;
} else {
qDebug() << "Invalid websocket object onConnected!";

Loading…
Cancel
Save