Browse Source

Speed up refresh rates

pull/45/head
Jonathan "Duke" Leto 5 years ago
parent
commit
109a6e13b7
  1. 4
      src/settings.cpp
  2. 8
      src/settings.h

4
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) {
@ -273,7 +273,7 @@ bool Settings::isValidAddress(QString addr) {
QRegExp zsexp("^zs1[a-z0-9]{75}$", Qt::CaseInsensitive);
QRegExp ztsexp("^ztestsapling[a-z0-9]{76}", Qt::CaseInsensitive);
QRegExp texp("^R[a-z0-9]{33}$", Qt::CaseInsensitive);
qDebug() << "isValidAddress(" << addr << ")";
//qDebug() << "isValidAddress(" << addr << ")";
return texp.exactMatch(addr) || ztsexp.exactMatch(addr) || zsexp.exactMatch(addr);
}

8
src/settings.h

@ -104,9 +104,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()
@ -128,4 +128,4 @@ private:
double zecPrice = 0.0;
};
#endif // SETTINGS_H
#endif // SETTINGS_H

Loading…
Cancel
Save