mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-22 10:44:46 +00:00
Wallet: fix transfer with Qt 5.12
This commit is contained in:
parent
816eeb4647
commit
f53af12e02
3 changed files with 12 additions and 8 deletions
2
main.qml
2
main.qml
|
@ -885,7 +885,7 @@ ApplicationWindow {
|
||||||
return recipient.address;
|
return recipient.address;
|
||||||
});
|
});
|
||||||
const amountsxmr = recipients.map(function (recipient) {
|
const amountsxmr = recipients.map(function (recipient) {
|
||||||
return walletManager.amountFromString(recipient.amount);
|
return recipient.amount;
|
||||||
});
|
});
|
||||||
currentWallet.createTransactionAsync(addresses, paymentId, amountsxmr, mixinCount, priority);
|
currentWallet.createTransactionAsync(addresses, paymentId, amountsxmr, mixinCount, priority);
|
||||||
}
|
}
|
||||||
|
|
|
@ -535,7 +535,7 @@ void Wallet::pauseRefresh()
|
||||||
PendingTransaction *Wallet::createTransaction(
|
PendingTransaction *Wallet::createTransaction(
|
||||||
const QVector<QString> &destinationAddresses,
|
const QVector<QString> &destinationAddresses,
|
||||||
const QString &payment_id,
|
const QString &payment_id,
|
||||||
const QVector<quint64> &amounts,
|
const QVector<QString> &destinationAmounts,
|
||||||
quint32 mixin_count,
|
quint32 mixin_count,
|
||||||
PendingTransaction::Priority priority)
|
PendingTransaction::Priority priority)
|
||||||
{
|
{
|
||||||
|
@ -543,11 +543,15 @@ PendingTransaction *Wallet::createTransaction(
|
||||||
for (const auto &address : destinationAddresses) {
|
for (const auto &address : destinationAddresses) {
|
||||||
destinations.push_back(address.toStdString());
|
destinations.push_back(address.toStdString());
|
||||||
}
|
}
|
||||||
|
std::vector<uint64_t> amounts;
|
||||||
|
for (const auto &amount : destinationAmounts) {
|
||||||
|
amounts.push_back(Monero::Wallet::amountFromString(amount.toStdString()));
|
||||||
|
}
|
||||||
std::set<uint32_t> subaddr_indices;
|
std::set<uint32_t> subaddr_indices;
|
||||||
Monero::PendingTransaction *ptImpl = m_walletImpl->createTransactionMultDest(
|
Monero::PendingTransaction *ptImpl = m_walletImpl->createTransactionMultDest(
|
||||||
destinations,
|
destinations,
|
||||||
payment_id.toStdString(),
|
payment_id.toStdString(),
|
||||||
std::vector<uint64_t>(amounts.begin(), amounts.end()),
|
amounts,
|
||||||
mixin_count,
|
mixin_count,
|
||||||
static_cast<Monero::PendingTransaction::Priority>(priority),
|
static_cast<Monero::PendingTransaction::Priority>(priority),
|
||||||
currentSubaddressAccount(),
|
currentSubaddressAccount(),
|
||||||
|
@ -559,12 +563,12 @@ PendingTransaction *Wallet::createTransaction(
|
||||||
void Wallet::createTransactionAsync(
|
void Wallet::createTransactionAsync(
|
||||||
const QVector<QString> &destinationAddresses,
|
const QVector<QString> &destinationAddresses,
|
||||||
const QString &payment_id,
|
const QString &payment_id,
|
||||||
const QVector<quint64> &amounts,
|
const QVector<QString> &destinationAmounts,
|
||||||
quint32 mixin_count,
|
quint32 mixin_count,
|
||||||
PendingTransaction::Priority priority)
|
PendingTransaction::Priority priority)
|
||||||
{
|
{
|
||||||
m_scheduler.run([this, destinationAddresses, payment_id, amounts, mixin_count, priority] {
|
m_scheduler.run([this, destinationAddresses, payment_id, destinationAmounts, mixin_count, priority] {
|
||||||
PendingTransaction *tx = createTransaction(destinationAddresses, payment_id, amounts, mixin_count, priority);
|
PendingTransaction *tx = createTransaction(destinationAddresses, payment_id, destinationAmounts, mixin_count, priority);
|
||||||
emit transactionCreated(tx, destinationAddresses, payment_id, mixin_count);
|
emit transactionCreated(tx, destinationAddresses, payment_id, mixin_count);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -220,7 +220,7 @@ public:
|
||||||
Q_INVOKABLE void createTransactionAsync(
|
Q_INVOKABLE void createTransactionAsync(
|
||||||
const QVector<QString> &destinationAddresses,
|
const QVector<QString> &destinationAddresses,
|
||||||
const QString &payment_id,
|
const QString &payment_id,
|
||||||
const QVector<quint64> &amounts,
|
const QVector<QString> &destinationAmounts,
|
||||||
quint32 mixin_count,
|
quint32 mixin_count,
|
||||||
PendingTransaction::Priority priority);
|
PendingTransaction::Priority priority);
|
||||||
|
|
||||||
|
@ -421,7 +421,7 @@ private:
|
||||||
PendingTransaction *createTransaction(
|
PendingTransaction *createTransaction(
|
||||||
const QVector<QString> &destinationAddresses,
|
const QVector<QString> &destinationAddresses,
|
||||||
const QString &payment_id,
|
const QString &payment_id,
|
||||||
const QVector<quint64> &amounts,
|
const QVector<QString> &destinationAmounts,
|
||||||
quint32 mixin_count,
|
quint32 mixin_count,
|
||||||
PendingTransaction::Priority priority);
|
PendingTransaction::Priority priority);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue