mirror of
https://github.com/feather-wallet/feather.git
synced 2024-12-23 03:59:29 +00:00
TxConfAdv: label dummy outputs
This commit is contained in:
parent
6c3b691ae9
commit
cfa96e8126
4 changed files with 11 additions and 10 deletions
|
@ -110,7 +110,7 @@ void TxConfAdvDialog::setupConstructionData(ConstructionInfo *ci) {
|
|||
auto address = o->address();
|
||||
auto amount = WalletManager::displayAmount(o->amount());
|
||||
auto index = m_ctx->wallet->subaddressIndex(address);
|
||||
cursor.insertText(address, Utils::addressTextFormat(index));
|
||||
cursor.insertText(address, Utils::addressTextFormat(index, o->amount()));
|
||||
cursor.insertText(QString(" %1").arg(amount), QTextCharFormat());
|
||||
cursor.insertBlock();
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ TxInfoDialog::TxInfoDialog(QSharedPointer<AppContext> ctx, TransactionInfo *txIn
|
|||
auto address = transfer->address();
|
||||
auto amount = WalletManager::displayAmount(transfer->amount());
|
||||
auto index = m_ctx->wallet->subaddressIndex(address);
|
||||
cursor.insertText(address, Utils::addressTextFormat(index));
|
||||
cursor.insertText(address, Utils::addressTextFormat(index, transfer->amount()));
|
||||
cursor.insertText(QString(" %1").arg(amount), QTextCharFormat());
|
||||
cursor.insertBlock();
|
||||
}
|
||||
|
|
|
@ -453,20 +453,21 @@ int Utils::maxLength(const QVector<QString> &array) {
|
|||
return maxLength;
|
||||
}
|
||||
|
||||
QTextCharFormat Utils::addressTextFormat(const SubaddressIndex &index) {
|
||||
QTextCharFormat Utils::addressTextFormat(const SubaddressIndex &index, quint64 amount) {
|
||||
QTextCharFormat rec;
|
||||
if (index.isPrimary()) {
|
||||
QTextCharFormat rec;
|
||||
rec.setBackground(QBrush(ColorScheme::YELLOW.asColor(true)));
|
||||
rec.setToolTip("Wallet change/primary address");
|
||||
return rec;
|
||||
}
|
||||
if (index.isValid()) {
|
||||
QTextCharFormat rec;
|
||||
else if (index.isValid()) {
|
||||
rec.setBackground(QBrush(ColorScheme::GREEN.asColor(true)));
|
||||
rec.setToolTip("Wallet receive address");
|
||||
return rec;
|
||||
}
|
||||
return QTextCharFormat();
|
||||
else if (amount == 0) {
|
||||
rec.setBackground(QBrush(ColorScheme::GRAY.asColor(true)));
|
||||
rec.setToolTip("Dummy output (Min. 2 outs consensus rule)");
|
||||
}
|
||||
return rec;
|
||||
}
|
||||
|
||||
bool Utils::isTorsocks() {
|
||||
|
|
|
@ -75,7 +75,7 @@ public:
|
|||
static QString amountToCurrencyString(double amount, const QString ¤cyCode);
|
||||
static int maxLength(const QVector<QString> &array);
|
||||
static QMap<QString, QLocale> localeCache;
|
||||
static QTextCharFormat addressTextFormat(const SubaddressIndex &index);
|
||||
static QTextCharFormat addressTextFormat(const SubaddressIndex &index, quint64 amount);
|
||||
static bool isTorsocks();
|
||||
static QString defaultWalletDir();
|
||||
|
||||
|
|
Loading…
Reference in a new issue