set(CMAKE_VERBOSE_MAKEFILE ON)
endif()
-set(MONERO_HEAD "13fa706d276fb896a7221b5580cf61a04b59ed0e")
+set(MONERO_HEAD "d4257af2e7503fc6dc09fc704606230d353a0a02")
set(BUILD_GUI_DEPS ON)
option(ARCH "Target architecture" "x86-64")
set(BUILD_64 ON)
void TxImportDialog::loadTx() {
QString txid = ui->line_txid->text();
+
+ if (m_ctx->wallet->haveTransaction(txid)) {
+ QMessageBox::warning(this, "Warning", "This transaction already exists in the wallet. "
+ "If you can't find it in your history, "
+ "check if it belongs to a different account (Wallet -> Account)");
+ return;
+ }
+
FeatherNode node = m_ctx->nodes->connection();
if (node.isLocal()) {
bool double_spend_seen = tx.value("double_spend_seen").toBool();
if (m_ctx->wallet->importTransaction(tx.value("tx_hash").toString(), output_indices, height, timestamp, false, pool, double_spend_seen)) {
+ if (!m_ctx->wallet->haveTransaction(txid)) {
+ QMessageBox::warning(this, "Import transaction", "This transaction does not belong to this wallet.");
+ return;
+ }
QMessageBox::information(this, "Import transaction", "Transaction imported successfully.");
} else {
QMessageBox::warning(this, "Import transaction", "Transaction import failed.");
return QString::fromStdString(m_walletImpl->printScannedPoolTxs());
}
+bool Wallet::haveTransaction(const QString &txid)
+{
+ return m_walletImpl->haveTransaction(txid.toStdString());
+}
+
void Wallet::startRefresh()
{
m_refreshEnabled = true;
QString printAddressBook();
QString printScannedPoolTxs();
+ //! does wallet have txid
+ bool haveTransaction(const QString &txid);
+
//! refreshes the wallet
bool refresh(bool historyAndSubaddresses = false);