Changeset View
Changeset View
Standalone View
Standalone View
src/qt/guiutil.cpp
Show First 20 Lines • Show All 194 Lines • ▼ Show 20 Lines | for (QList<QPair<QString, QString>>::iterator i = items.begin(); | ||||
rv.label = i->second; | rv.label = i->second; | ||||
fShouldReturnFalse = false; | fShouldReturnFalse = false; | ||||
} | } | ||||
if (i->first == "message") { | if (i->first == "message") { | ||||
rv.message = i->second; | rv.message = i->second; | ||||
fShouldReturnFalse = false; | fShouldReturnFalse = false; | ||||
} else if (i->first == "amount") { | } else if (i->first == "amount") { | ||||
if (!i->second.isEmpty()) { | if (!i->second.isEmpty()) { | ||||
if (!BitcoinUnits::parse(BitcoinUnits::BCH, i->second, | Amount amt; | ||||
&rv.amount)) { | if (!BitcoinUnits::parse(BitcoinUnits::BCH, i->second, &amt)) { | ||||
return false; | return false; | ||||
} | } | ||||
rv.amount = amt.GetSatoshis(); | |||||
} | } | ||||
fShouldReturnFalse = false; | fShouldReturnFalse = false; | ||||
} | } | ||||
if (fShouldReturnFalse) { | if (fShouldReturnFalse) { | ||||
return false; | return false; | ||||
} | } | ||||
} | } | ||||
Show All 39 Lines | if (!info.message.isEmpty()) { | ||||
ret += | ret += | ||||
QString("%1message=%2").arg(paramCount == 0 ? "?" : "&").arg(msg); | QString("%1message=%2").arg(paramCount == 0 ? "?" : "&").arg(msg); | ||||
paramCount++; | paramCount++; | ||||
} | } | ||||
return ret; | return ret; | ||||
} | } | ||||
bool isDust(const QString &address, const CAmount &amount) { | bool isDust(const QString &address, const Amount amount) { | ||||
CTxDestination dest = DecodeDestination(address.toStdString()); | CTxDestination dest = DecodeDestination(address.toStdString()); | ||||
CScript script = GetScriptForDestination(dest); | CScript script = GetScriptForDestination(dest); | ||||
CTxOut txOut(Amount(amount), script); | CTxOut txOut(amount, script); | ||||
return txOut.IsDust(dustRelayFee); | return txOut.IsDust(dustRelayFee); | ||||
} | } | ||||
QString HtmlEscape(const QString &str, bool fMultiLine) { | QString HtmlEscape(const QString &str, bool fMultiLine) { | ||||
#if QT_VERSION < 0x050000 | #if QT_VERSION < 0x050000 | ||||
QString escaped = Qt::escape(str); | QString escaped = Qt::escape(str); | ||||
#else | #else | ||||
QString escaped = str.toHtmlEscaped(); | QString escaped = str.toHtmlEscaped(); | ||||
▲ Show 20 Lines • Show All 725 Lines • Show Last 20 Lines |