mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-17 23:31:32 +02:00
Compare base addresses due to wallet2 integrated address inconsistency
This commit is contained in:
+1
-1
Submodule monero updated: ed9996693a...566e6e1904
+3
-2
@@ -667,11 +667,12 @@ void MainWindow::onCreateTransactionSuccess(PendingTransaction *tx, const QVecto
|
||||
tx->refresh();
|
||||
QSet<QString> outputAddresses;
|
||||
for (const auto &output : tx->transaction(0)->outputs()) {
|
||||
outputAddresses.insert(output->address());
|
||||
outputAddresses.insert(WalletManager::baseAddressFromIntegratedAddress(output->address(), constants::networkType));
|
||||
}
|
||||
QSet<QString> 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.");
|
||||
|
||||
@@ -250,6 +250,11 @@ QString WalletManager::paymentIdFromAddress(const QString &address, NetworkType:
|
||||
return QString::fromStdString(Monero::Wallet::paymentIdFromAddress(address.toStdString(), static_cast<Monero::NetworkType>(nettype)));
|
||||
}
|
||||
|
||||
QString WalletManager::baseAddressFromIntegratedAddress(const QString &address, NetworkType::Type nettype)
|
||||
{
|
||||
return QString::fromStdString(Monero::Wallet::baseAddressFromIntegratedAddress(address.toStdString(), static_cast<Monero::NetworkType>(nettype))) ;
|
||||
}
|
||||
|
||||
bool WalletManager::isDaemonLocal(const QString &daemon_address) const
|
||||
{
|
||||
return daemon_address.isEmpty() ? false : Monero::Utils::isAddressLocal(daemon_address.toStdString());
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user