Browse Source

change some ports,add Hush explorer,add Hush Discord and Website

pull/14/head
DenioD 5 years ago
parent
commit
2dccd522a8
  1. 3
      README.md
  2. 3852
      compile_commands.json
  3. 24
      lib/Cargo.lock
  4. 2
      lib/Cargo.toml
  5. 4
      lib/silentdragonlitelib.h
  6. 11
      lib/src/lib.rs
  7. 4
      src/liteinterface.cpp
  8. 8
      src/main.cpp
  9. 46
      src/mainwindow.cpp
  10. 2
      src/mainwindow.h
  11. 16
      src/mainwindow.ui
  12. 9
      src/scripts/control
  13. 4
      src/sendtab.cpp
  14. 26
      src/settings.cpp
  15. 6
      src/settings.h

3
README.md

@ -1,4 +1,5 @@
silentdragon-lite is z-Addr first, Sapling compatible wallet lightwallet for hush
silentdragon-lite is z-Addr first, Sapling compatible wallet lightwallet for hush still in very experimental status! Use it on your own Risk!
## Compiling from source
* silentdragon is written in C++ 14, and can be compiled with g++/clang++/visual c++.

3852
compile_commands.json

File diff suppressed because it is too large

24
lib/Cargo.lock

@ -1051,7 +1051,7 @@ version = "0.1.0"
dependencies = [
"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)",
"silentdragonlitelib 0.1.0 (git+https://github.com/DenioD/silentdragonlite-cli?rev=1011ff7c7c6d5fe7de078194538ae5a2a0e5e461)",
"silentdragonlitelib 0.1.0 (git+https://github.com/DenioD/silentdragonlite-cli?rev=99507a8fc6c874e027b0f002320c7b232f459761)",
]
[[package]]
@ -1467,7 +1467,7 @@ dependencies = [
[[package]]
name = "silentdragonlitelib"
version = "0.1.0"
source = "git+https://github.com/DenioD/silentdragonlite-cli?rev=1011ff7c7c6d5fe7de078194538ae5a2a0e5e461#1011ff7c7c6d5fe7de078194538ae5a2a0e5e461"
source = "git+https://github.com/DenioD/silentdragonlite-cli?rev=99507a8fc6c874e027b0f002320c7b232f459761#99507a8fc6c874e027b0f002320c7b232f459761"
dependencies = [
"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=44a1c3981df37b73d87f0e625ca3557d8534e6f3)",
@ -1496,10 +1496,10 @@ dependencies = [
"tiny-bip39 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio 0.1.22 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-rustls 0.10.0-alpha.4 (registry+https://github.com/rust-lang/crates.io-index)",
"tower-grpc 0.1.1 (git+https://github.com/tower-rs/tower-grpc)",
"tower-grpc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"tower-grpc-build 0.1.0 (git+https://github.com/tower-rs/tower-grpc)",
"tower-h2 0.1.0 (git+https://github.com/tower-rs/tower-h2)",
"tower-request-modifier 0.1.0 (git+https://github.com/tower-rs/tower-http)",
"tower-h2 0.1.0 (git+https://github.com/tower-rs/tower-h2?rev=0865040d699697bbaf1c3b77b3f256b72f98cdf4)",
"tower-request-modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tower-service 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tower-util 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"webpki 0.19.1 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1917,7 +1917,7 @@ dependencies = [
[[package]]
name = "tower-grpc"
version = "0.1.1"
source = "git+https://github.com/tower-rs/tower-grpc#5308ec0d3433dd8c22cafd0ca37456824dff827e"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)",
"bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1945,7 +1945,7 @@ dependencies = [
[[package]]
name = "tower-h2"
version = "0.1.0"
source = "git+https://github.com/tower-rs/tower-h2#0865040d699697bbaf1c3b77b3f256b72f98cdf4"
source = "git+https://github.com/tower-rs/tower-h2?rev=0865040d699697bbaf1c3b77b3f256b72f98cdf4#0865040d699697bbaf1c3b77b3f256b72f98cdf4"
dependencies = [
"bytes 0.4.12 (registry+https://github.com/rust-lang/crates.io-index)",
"futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2017,7 +2017,7 @@ dependencies = [
[[package]]
name = "tower-request-modifier"
version = "0.1.0"
source = "git+https://github.com/tower-rs/tower-http#cb393c933f5167f934abde9d4f902e44d9ea2d50"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)",
"http 0.1.19 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2481,7 +2481,7 @@ dependencies = [
"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 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=1011ff7c7c6d5fe7de078194538ae5a2a0e5e461)" = "<none>"
"checksum silentdragonlitelib 0.1.0 (git+https://github.com/DenioD/silentdragonlite-cli?rev=99507a8fc6c874e027b0f002320c7b232f459761)" = "<none>"
"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 sodiumoxide 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "585232e78a4fc18133eef9946d3080befdf68b906c51b621531c37e91787fa2b"
@ -2520,15 +2520,15 @@ dependencies = [
"checksum tower 0.1.1 (git+https://github.com/tower-rs/tower)" = "<none>"
"checksum tower-buffer 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "3c7b83e1ccf5b23dd109dd6ae2c07b8e2beec7a51a21f29da2dba576317370e0"
"checksum tower-discover 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "73a7632286f78164d65d18fd0e570307acde9362489aa5c8c53e6315cc2bde47"
"checksum tower-grpc 0.1.1 (git+https://github.com/tower-rs/tower-grpc)" = "<none>"
"checksum tower-grpc 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ddd833a116f724984a09ff25c27ea5d0b9a65d301f48048e366f8f3c6081c2cb"
"checksum tower-grpc-build 0.1.0 (git+https://github.com/tower-rs/tower-grpc)" = "<none>"
"checksum tower-h2 0.1.0 (git+https://github.com/tower-rs/tower-h2)" = "<none>"
"checksum tower-h2 0.1.0 (git+https://github.com/tower-rs/tower-h2?rev=0865040d699697bbaf1c3b77b3f256b72f98cdf4)" = "<none>"
"checksum tower-http 0.1.0 (git+https://github.com/tower-rs/tower-http)" = "<none>"
"checksum tower-http-util 0.1.0 (git+https://github.com/tower-rs/tower-http)" = "<none>"
"checksum tower-layer 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0ddf07e10c07dcc8f41da6de036dc66def1a85b70eb8a385159e3908bb258328"
"checksum tower-limit 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2d990c5b6c0e4e192db8cf3dacaafefe1278962d0ec45dc84421175db32d33f0"
"checksum tower-load-shed 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "04fbaf5bfb63d84204db87b9b2aeec61549613f2bbb8706dcc36f5f3ea8cd769"
"checksum tower-request-modifier 0.1.0 (git+https://github.com/tower-rs/tower-http)" = "<none>"
"checksum tower-request-modifier 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f6af257a01ba5f7a5c6190a70220cceebe832fa836e689cb8f73cb0e53112af5"
"checksum tower-retry 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "09e80588125061f276ed2a7b0939988b411e570a2dbb2965b1382ef4f71036f7"
"checksum tower-service 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2cc0c98637d23732f8de6dfd16494c9f1559c3b9e20b4a46462c8f9b9e827bfa"
"checksum tower-timeout 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "5c06bbc2fbd056f810940a8c6f0cc194557d36da3c22999a755a7a6612447da9"

2
lib/Cargo.toml

@ -11,4 +11,4 @@ crate-type = ["staticlib"]
[dependencies]
libc = "0.2.58"
lazy_static = "1.4.0"
silentdragonlitelib = { git = "https://github.com/DenioD/silentdragonlite-cli", rev = "1011ff7c7c6d5fe7de078194538ae5a2a0e5e461" }
silentdragonlitelib = { git = "https://github.com/DenioD/silentdragonlite-cli", rev = "99507a8fc6c874e027b0f002320c7b232f459761" }

4
lib/silentdragonlitelib.h

@ -5,7 +5,7 @@
extern "C" {
#endif
extern bool litelib_wallet_exists (const char* chain_name);
extern bool litelib_wallet_exists (const char* chain_name, const char* dir);
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);
@ -14,4 +14,4 @@ extern void litelib_rust_free_string (char* s);
}
#endif
#endif
#endif

11
lib/src/lib.rs

@ -17,18 +17,7 @@ lazy_static! {
}
// Check if there is an existing wallet
#[no_mangle]
pub extern fn litelib_wallet_exists(chain_name: *const c_char) -> bool {
let chain_name_str = unsafe {
assert!(!chain_name.is_null());
CStr::from_ptr(chain_name).to_string_lossy().into_owned()
};
let config = LightClientConfig::create_unconnected(chain_name_str);
config.wallet_exists()
}
// Initialize a new lightclient and store its value
#[no_mangle]

4
src/liteinterface.cpp

@ -39,14 +39,14 @@ void LiteInterface::createNewZaddr(bool, const std::function<void(json)>& cb) {
if (conn == nullptr)
return;
conn->doRPCWithDefaultErrorHandling("new", "z", cb);
conn->doRPCWithDefaultErrorHandling("new", "zs", cb);
}
void LiteInterface::createNewTaddr(const std::function<void(json)>& cb) {
if (conn == nullptr)
return;
conn->doRPCWithDefaultErrorHandling("new", "t", cb);
conn->doRPCWithDefaultErrorHandling("new", "R", cb);
}
void LiteInterface::fetchPrivKey(QString addr, const std::function<void(json)>& cb) {

8
src/main.cpp

@ -156,7 +156,7 @@ public:
parser.addOption(confOption);
// 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");
parser.process(a);
@ -169,8 +169,8 @@ public:
return 0;
}
QCoreApplication::setOrganizationName("silentdragon-org");
QCoreApplication::setApplicationName("silentdragon");
QCoreApplication::setOrganizationName("myhush.org");
QCoreApplication::setApplicationName("SilentDragonLite");
QString locale = QLocale::system().name();
locale.truncate(locale.lastIndexOf('_')); // Get the language code
@ -214,7 +214,7 @@ public:
}
w = new MainWindow();
w->setWindowTitle("silentdragon v" + QString(APP_VERSION));
w->setWindowTitle("SilentDragonLite v" + QString(APP_VERSION));
// If there was a payment URI on the command line, pay it
if (parser.positionalArguments().length() > 0) {

46
src/mainwindow.cpp

@ -50,12 +50,16 @@ MainWindow::MainWindow(QWidget *parent) :
// Set up exit action
QObject::connect(ui->actionExit, &QAction::triggered, this, &MainWindow::close);
// Set up donate action
// Set up Feedback action
QObject::connect(ui->actionDonate, &QAction::triggered, this, &MainWindow::donate);
QObject::connect(ui->actionDiscord, &QAction::triggered, this, &MainWindow::discord);
QObject::connect(ui->actionWebsite, &QAction::triggered, this, &MainWindow::website);
// File a bug
QObject::connect(ui->actionFile_a_bug, &QAction::triggered, [=]() {
QDesktopServices::openUrl(QUrl("https://github.com/hushfoundation/silentdragon/issues/new"));
QDesktopServices::openUrl(QUrl("https://github.com/MyHush/silentdragonlite/issues/new"));
});
// Set up check for updates action
@ -142,9 +146,9 @@ MainWindow::MainWindow(QWidget *parent) :
}
void MainWindow::createWebsocket(QString wormholecode) {
qDebug() << "Listening for app connections on port 8237";
qDebug() << "Listening for app connections on port 8777";
// Create the websocket server, for listening to direct connections
wsserver = new WSServer(8237, false, this);
wsserver = new WSServer(8777, false, this);
if (!wormholecode.isEmpty()) {
// Connect to the wormhole service
@ -267,7 +271,7 @@ void MainWindow::setupSettingsModal() {
QObject::connect(settings.comboBoxTheme, &QComboBox::currentTextChanged, [=] (QString theme_name) {
this->slot_change_theme(theme_name);
// Tell the user to restart
QMessageBox::information(this, tr("Restart"), tr("Please restart silentdragon to have the theme apply"), QMessageBox::Ok);
QMessageBox::information(this, tr("Restart"), tr("Please restart Silentdragonlite to have the theme apply"), QMessageBox::Ok);
});
// Save sent transactions
@ -306,7 +310,7 @@ void MainWindow::setupSettingsModal() {
settings.rpcpassword->setEnabled(false);
}
else {
settings.confMsg->setText("No local hush.conf found. Please configure connection manually.");
settings.confMsg->setText("No local HUSH3.conf found. Please configure connection manually.");
settings.hostname->setEnabled(true);
settings.port->setEnabled(true);
settings.rpcuser->setEnabled(true);
@ -355,7 +359,7 @@ void MainWindow::setupSettingsModal() {
rpc->getConnection()->config->proxy = "proxy=127.0.0.1:9050";
QMessageBox::information(this, tr("Enable Tor"),
tr("Connection over Tor has been enabled. To use this feature, you need to restart silentdragon."),
tr("Connection over Tor has been enabled. To use this feature, you need to restart Silentdragonlite."),
QMessageBox::Ok);
}
@ -417,17 +421,26 @@ void MainWindow::addressBook() {
AddressBook::open(this);
}
void MainWindow::discord() {
QString url = "https://myhush.org/discord/";
QDesktopServices::openUrl(QUrl(url));
}
void MainWindow::website() {
QString url = "https://myhush.org";
QDesktopServices::openUrl(QUrl(url));
}
void MainWindow::donate() {
// Set up a donation to me :)
clearSendForm();
ui->Address1->setText(Settings::getDonationAddr());
ui->Address1->setCursorPosition(0);
ui->Amount1->setText("0.01");
ui->MemoTxt1->setText(tr("Thanks for supporting silentdragon!"));
ui->Amount1->setText("0.00");
ui->MemoTxt1->setText(tr("Some feedback about SilentDragonlite or Hush..."));
ui->statusBar->showMessage(tr("Donate 0.01 ") % Settings::getTokenName() % tr(" to support silentdragon"));
ui->statusBar->showMessage(tr("Send Duke some private and shielded feedback about") % Settings::getTokenName() % tr(" or SilentDragonLite"));
// And switch to the send tab.
ui->tabWidget->setCurrentIndex(1);
@ -508,8 +521,8 @@ void MainWindow::payhushURI(QString uri, QString myAddr) {
// If there was no URI passed, ask the user for one.
if (uri.isEmpty()) {
uri = QInputDialog::getText(this, tr("Paste hush URI"),
"hush URI" + QString(" ").repeated(180));
uri = QInputDialog::getText(this, tr("Paste HUSH URI"),
"HUSH URI" + QString(" ").repeated(180));
}
// If there's no URI, just exit
@ -520,7 +533,7 @@ void MainWindow::payhushURI(QString uri, QString myAddr) {
qDebug() << "Received URI " << uri;
PaymentURI paymentInfo = Settings::parseURI(uri);
if (!paymentInfo.error.isEmpty()) {
QMessageBox::critical(this, tr("Error paying hush URI"),
QMessageBox::critical(this, tr("Error paying HUSH URI"),
tr("URI should be of the form 'hush:<addr>?amt=x&memo=y") + "\n" + paymentInfo.error);
return;
}
@ -620,6 +633,7 @@ void MainWindow::exportTransactions() {
void MainWindow::backupWalletDat() {
if (!rpc->getConnection())
return;
}
// QDir hushdir(rpc->getConnection()->config->hushDir);
// QString backupDefaultName = "hush-wallet-backup-" + QDateTime::currentDateTime().toString("yyyyMMdd") + ".dat";
@ -644,7 +658,7 @@ void MainWindow::backupWalletDat() {
// QMessageBox::critical(this, tr("Couldn't backup"), tr("Couldn't backup the wallet.dat file.") +
// tr("You need to back it up manually."), QMessageBox::Ok);
// }
}
void MainWindow::exportAllKeys() {
exportKeys("");
@ -664,7 +678,7 @@ void MainWindow::exportKeys(QString addr) {
Settings::saveRestore(&d);
pui.privKeyTxt->setPlainText(tr("This might take several minutes. Loading..."));
pui.privKeyTxt->setPlainText(tr("Loading..."));
pui.privKeyTxt->setReadOnly(true);
pui.privKeyTxt->setLineWrapMode(QPlainTextEdit::LineWrapMode::NoWrap);

2
src/mainwindow.h

@ -116,6 +116,8 @@ private:
void setMemoEnabled(int number, bool enabled);
void donate();
void discord();
void website();
void addressBook();
void importPrivKey();
void exportAllKeys();

16
src/mainwindow.ui

@ -1074,6 +1074,8 @@
<string>&amp;Help</string>
</property>
<addaction name="actionDonate"/>
<addaction name="actionDiscord"/>
<addaction name="actionWebsite"/>
<addaction name="actionCheck_for_Updates"/>
<addaction name="actionFile_a_bug"/>
<addaction name="actionAbout"/>
@ -1118,9 +1120,19 @@
</action>
<action name="actionDonate">
<property name="text">
<string>&amp;Donate</string>
<string>&amp;Send Duke Feedback</string>
</property>
</action>
</action>
<action name="actionDiscord">
<property name="text">
<string>&amp;Hush Discord</string>
</property>
</action>
<action name="actionWebsite">
<property name="text">
<string>&amp;Hush Website</string>
</property>
</action>
<action name="actionCheck_for_Updates">
<property name="text">
<string>Check github.com for &amp;updates</string>

9
src/scripts/control

@ -1,9 +1,8 @@
Package: hush-qt-wallet
Package: silentdragonlite
Version: RELEASE_VERSION
Section: base
Priority: optional
Architecture: amd64
Maintainer: Aditya Kulkarni <hush@adityapk.com>
Description: silentdragon is a full node and UI wallet for hush.
silentdragon is a full node and UI wallet for hush. It comes with
full support for shielded addresses and many apps for hush.
Maintainer: DenioD <admin@hush-lightwallet.de>
Description: Silentdragonlite is a Lightwallet for hush. It comes with
full support for transparent and shielded addresses.

4
src/sendtab.cpp

@ -187,11 +187,11 @@ void MainWindow::setDefaultPayFrom() {
};
// By default, select the z-address with the most balance from the inputs combo
auto maxZ = findMax("z");
auto maxZ = findMax("zs1");
if (maxZ >= 0) {
ui->inputsCombo->setCurrentIndex(maxZ);
} else {
auto maxT = findMax("t");
auto maxT = findMax("R");
maxT = maxT >= 0 ? maxT : 0;
ui->inputsCombo->setCurrentIndex(maxT);
}

26
src/settings.cpp

@ -58,7 +58,7 @@ bool Settings::isSaplingAddress(QString addr) {
return false;
return ( isTestnet() && addr.startsWith("ztestsapling")) ||
(!isTestnet() && addr.startsWith("zs"));
(!isTestnet() && addr.startsWith("zs1"));
}
bool Settings::isSproutAddress(QString addr) {
@ -79,7 +79,7 @@ bool Settings::isTAddress(QString addr) {
if (!isValidAddress(addr))
return false;
return addr.startsWith("t");
return addr.startsWith("R");
}
int Settings::gethushdVersion() {
@ -107,8 +107,8 @@ void Settings::setBlockNumber(int number) {
}
bool Settings::isSaplingActive() {
return (isTestnet() && getBlockNumber() > 280000) ||
(!isTestnet() && getBlockNumber() > 419200);
return (isTestnet() && getBlockNumber() > 1) ||
(!isTestnet() && getBlockNumber() > 1);
}
double Settings::gethushPrice() {
@ -199,7 +199,7 @@ void Settings::openAddressInExplorer(QString address) {
if (Settings::getInstance()->isTestnet()) {
url = "https://chain.so/address/hushTEST/" + address;
} else {
url = "https://chain.so/address/hush/" + address;
url = "https://explorer.myhush.org/address/" + address;
}
QDesktopServices::openUrl(QUrl(url));
}
@ -210,7 +210,7 @@ void Settings::openTxInExplorer(QString txid) {
url = "https://chain.so/tx/hushTEST/" + txid;
}
else {
url = "https://chain.so/tx/hush/" + txid;
url = "https://explorer.myhush.org/tx/" + txid;
}
QDesktopServices::openUrl(QUrl(url));
}
@ -254,7 +254,7 @@ const QString Settings::txidStatusMessage = QString(QObject::tr("Tx submitted (r
QString Settings::getTokenName() {
if (Settings::getInstance()->isTestnet()) {
return "TAZ";
return "HUSHT";
} else {
return "HUSH";
}
@ -262,9 +262,9 @@ QString Settings::getTokenName() {
QString Settings::getDonationAddr() {
if (Settings::getInstance()->isTestnet())
return "ztestsapling1wn6889vznyu42wzmkakl2effhllhpe4azhu696edg2x6me4kfsnmqwpglaxzs7tmqsq7kudemp5";
return "ztestsaplingXXX";
else
return "zs1gv64eu0v2wx7raxqxlmj354y9ycznwaau9kduljzczxztvs4qcl00kn2sjxtejvrxnkucw5xx9u";
return "zs1aq4xnrkjlnxx0zesqye7jz3dfrf3rjh7q5z6u8l6mwyqqaam3gx3j2fkqakp33v93yavq46j83q";
}
@ -343,13 +343,11 @@ bool Settings::isValidSaplingPrivateKey(QString pk) {
}
bool Settings::isValidAddress(QString addr) {
QRegExp zcexp("^z[a-z0-9]{94}$", Qt::CaseInsensitive);
QRegExp zsexp("^z[a-z0-9]{77}$", Qt::CaseInsensitive);
QRegExp zsexp("^zs1[a-z0-9]{75}$", Qt::CaseInsensitive);
QRegExp ztsexp("^ztestsapling[a-z0-9]{76}", Qt::CaseInsensitive);
QRegExp texp("^t[a-z0-9]{34}$", Qt::CaseInsensitive);
QRegExp texp("^R[a-z0-9]{33}$", Qt::CaseInsensitive);
return zcexp.exactMatch(addr) || texp.exactMatch(addr) ||
ztsexp.exactMatch(addr) || zsexp.exactMatch(addr);
return texp.exactMatch(addr) || ztsexp.exactMatch(addr) || zsexp.exactMatch(addr);
}
// Get a pretty string representation of this Payment URI

6
src/settings.h

@ -121,9 +121,9 @@ public:
static const QString labelRegExp;
static const int updateSpeed = 20 * 1000; // 20 sec
static const int quickUpdateSpeed = 5 * 1000; // 5 sec
static const int priceRefreshSpeed = 60 * 60 * 1000; // 1 hr
static const int updateSpeed = 10 * 1000; // 10 sec
static const int quickUpdateSpeed = 3 * 1000; // 3 sec
static const int priceRefreshSpeed = 15 * 60 * 1000; // 15 mins
private:
// This class can only be accessed through Settings::getInstance()

Loading…
Cancel
Save