diff --git a/monero b/monero index ed99966..566e6e1 160000 --- a/monero +++ b/monero @@ -1 +1 @@ -Subproject commit ed9996693aaa2c23206e43ca13b532aebc2cc2e7 +Subproject commit 566e6e1904f20d7537c8f4c7f50caf1a5ee86bf8 diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index b7790ee..8f4cd97 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -667,11 +667,12 @@ void MainWindow::onCreateTransactionSuccess(PendingTransaction *tx, const QVecto tx->refresh(); QSet outputAddresses; for (const auto &output : tx->transaction(0)->outputs()) { - outputAddresses.insert(output->address()); + outputAddresses.insert(WalletManager::baseAddressFromIntegratedAddress(output->address(), constants::networkType)); } QSet destAddresses; for (const auto &addr : address) { - destAddresses.insert(addr); + // TODO: Monero core bug, integrated address is not added to dests for transactions spending ALL + destAddresses.insert(WalletManager::baseAddressFromIntegratedAddress(addr, constants::networkType)); } if (!outputAddresses.contains(destAddresses)) { err = QString("%1 %2").arg(err, "Constructed transaction doesn't appear to send to (all) specified destination address(es). Try creating the transaction again."); diff --git a/src/libwalletqt/WalletManager.cpp b/src/libwalletqt/WalletManager.cpp index 3273e68..f092749 100644 --- a/src/libwalletqt/WalletManager.cpp +++ b/src/libwalletqt/WalletManager.cpp @@ -250,6 +250,11 @@ QString WalletManager::paymentIdFromAddress(const QString &address, NetworkType: return QString::fromStdString(Monero::Wallet::paymentIdFromAddress(address.toStdString(), static_cast(nettype))); } +QString WalletManager::baseAddressFromIntegratedAddress(const QString &address, NetworkType::Type nettype) +{ + return QString::fromStdString(Monero::Wallet::baseAddressFromIntegratedAddress(address.toStdString(), static_cast(nettype))) ; +} + bool WalletManager::isDaemonLocal(const QString &daemon_address) const { return daemon_address.isEmpty() ? false : Monero::Utils::isAddressLocal(daemon_address.toStdString()); diff --git a/src/libwalletqt/WalletManager.h b/src/libwalletqt/WalletManager.h index 6390b49..0611fba 100644 --- a/src/libwalletqt/WalletManager.h +++ b/src/libwalletqt/WalletManager.h @@ -98,6 +98,7 @@ public: static bool keyValid(const QString &key, const QString &address, bool isViewKey, NetworkType::Type nettype); QString paymentIdFromAddress(const QString &address, NetworkType::Type nettype) const; + static QString baseAddressFromIntegratedAddress(const QString &address, NetworkType::Type nettype); bool isDaemonLocal(const QString &daemon_address) const;