-Subproject commit 16e051c8a880a63aacdd217f24c55f9f6154bb00
+Subproject commit d50ba728d79cc3a96c928f7736503268ad567cba
ui->frameInputs->hide();
// }
+ ui->frame_destinationsWarning->hide();
+
QTextCursor cursor = ui->outputs->textCursor();
auto transfers = txInfo->transfers();
if (!transfers.isEmpty()) {
+ bool hasIntegrated = false;
+
for (const auto& transfer : transfers) {
auto address = transfer->address();
auto amount = WalletManager::displayAmount(transfer->amount());
cursor.insertText(address, Utils::addressTextFormat(index, transfer->amount()));
cursor.insertText(QString(" %1").arg(amount), QTextCharFormat());
cursor.insertBlock();
+
+ if (WalletManager::baseAddressFromIntegratedAddress(transfer->address(), constants::networkType) != transfer->address()) {
+ hasIntegrated = true;
+ }
}
ui->label_outputs->setText(QString("Destinations (%2)").arg(QString::number(transfers.size())));
this->adjustHeight(ui->outputs, transfers.size());
+
+ // Trezor saves a mangled payment ID.
+ if (m_wallet->isTrezor() && !hasIntegrated && txInfo->hasPaymentId()) {
+ ui->frame_destinationsWarning->setInfo(icons()->icon("warning"), "The address displayed here does not contain a payment ID. "
+ "If you are making a repeat payment to a service, "
+ "do not copy the address from here to prevent a loss of funds.");
+ ui->frame_destinationsWarning->show();
+ }
} else {
ui->frameOutputs->hide();
}
<x>0</x>
<y>0</y>
<width>929</width>
- <height>715</height>
+ <height>723</height>
</rect>
</property>
<property name="windowTitle">
</property>
</widget>
</item>
+ <item>
+ <widget class="InfoFrame" name="frame_destinationsWarning">
+ <property name="frameShape">
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ </widget>
+ </item>
<item>
<widget class="QTextEdit" name="outputs">
<property name="sizePolicy">
</item>
</layout>
</widget>
+ <customwidgets>
+ <customwidget>
+ <class>InfoFrame</class>
+ <extends>QFrame</extends>
+ <header>components.h</header>
+ <container>1</container>
+ </customwidget>
+ </customwidgets>
<resources/>
<connections/>
</ui>
clearRows();
quint64 lastTxHeight = 0;
+ bool hasFakePaymentId = m_wallet->isTrezor();
m_locked = false;
m_minutesToUnlock = 0;
-
uint64_t min_height = 0;
uint64_t max_height = (uint64_t)-1;
uint64_t wallet_height = m_wallet->blockChainHeight();
// single output transaction might contain multiple transfers
for (auto const &d: pd.m_dests)
{
- Transfer *transfer = new Transfer(d.amount, QString::fromStdString(d.address(m_wallet2->nettype(), pd.m_payment_id)), this);
+ Transfer *transfer = new Transfer(d.amount, QString::fromStdString(d.address(m_wallet2->nettype(), pd.m_payment_id, !hasFakePaymentId)), this);
t->m_transfers.append(transfer);
}
for (auto const &r: pd.m_rings)
for (auto const &d: pd.m_dests)
{
- Transfer *transfer = new Transfer(d.amount, QString::fromStdString(d.address(m_wallet2->nettype(), pd.m_payment_id)), this);
+ Transfer *transfer = new Transfer(d.amount, QString::fromStdString(d.address(m_wallet2->nettype(), pd.m_payment_id, !hasFakePaymentId)), this);
t->m_transfers.append(transfer);
}
for (auto const &r: pd.m_rings)
return rings;
}
+bool TransactionRow::hasPaymentId() const {
+ return m_paymentId != "0000000000000000";
+}
+
TransactionRow::~TransactionRow()
{
qDeleteAll(m_transfers);
QList<QString> destinations() const;
QList<Transfer*> transfers() const;
QString rings_formatted() const;
+ bool hasPaymentId() const;
private:
explicit TransactionRow(QObject *parent);