mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-16 15:58:11 +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;
|
||||
});
|
||||
const amountsxmr = recipients.map(function (recipient) {
|
||||
return walletManager.amountFromString(recipient.amount);
|
||||
return recipient.amount;
|
||||
});
|
||||
currentWallet.createTransactionAsync(addresses, paymentId, amountsxmr, mixinCount, priority);
|
||||
}
|
||||
|
|
|
@ -535,7 +535,7 @@ void Wallet::pauseRefresh()
|
|||
PendingTransaction *Wallet::createTransaction(
|
||||
const QVector<QString> &destinationAddresses,
|
||||
const QString &payment_id,
|
||||
const QVector<quint64> &amounts,
|
||||
const QVector<QString> &destinationAmounts,
|
||||
quint32 mixin_count,
|
||||
PendingTransaction::Priority priority)
|
||||
{
|
||||
|
@ -543,11 +543,15 @@ PendingTransaction *Wallet::createTransaction(
|
|||
for (const auto &address : destinationAddresses) {
|
||||
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;
|
||||
Monero::PendingTransaction *ptImpl = m_walletImpl->createTransactionMultDest(
|
||||
destinations,
|
||||
payment_id.toStdString(),
|
||||
std::vector<uint64_t>(amounts.begin(), amounts.end()),
|
||||
amounts,
|
||||
mixin_count,
|
||||
static_cast<Monero::PendingTransaction::Priority>(priority),
|
||||
currentSubaddressAccount(),
|
||||
|
@ -559,12 +563,12 @@ PendingTransaction *Wallet::createTransaction(
|
|||
void Wallet::createTransactionAsync(
|
||||
const QVector<QString> &destinationAddresses,
|
||||
const QString &payment_id,
|
||||
const QVector<quint64> &amounts,
|
||||
const QVector<QString> &destinationAmounts,
|
||||
quint32 mixin_count,
|
||||
PendingTransaction::Priority priority)
|
||||
{
|
||||
m_scheduler.run([this, destinationAddresses, payment_id, amounts, mixin_count, priority] {
|
||||
PendingTransaction *tx = createTransaction(destinationAddresses, payment_id, amounts, mixin_count, priority);
|
||||
m_scheduler.run([this, destinationAddresses, payment_id, destinationAmounts, mixin_count, priority] {
|
||||
PendingTransaction *tx = createTransaction(destinationAddresses, payment_id, destinationAmounts, mixin_count, priority);
|
||||
emit transactionCreated(tx, destinationAddresses, payment_id, mixin_count);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -220,7 +220,7 @@ public:
|
|||
Q_INVOKABLE void createTransactionAsync(
|
||||
const QVector<QString> &destinationAddresses,
|
||||
const QString &payment_id,
|
||||
const QVector<quint64> &amounts,
|
||||
const QVector<QString> &destinationAmounts,
|
||||
quint32 mixin_count,
|
||||
PendingTransaction::Priority priority);
|
||||
|
||||
|
@ -421,7 +421,7 @@ private:
|
|||
PendingTransaction *createTransaction(
|
||||
const QVector<QString> &destinationAddresses,
|
||||
const QString &payment_id,
|
||||
const QVector<quint64> &amounts,
|
||||
const QVector<QString> &destinationAmounts,
|
||||
quint32 mixin_count,
|
||||
PendingTransaction::Priority priority);
|
||||
|
||||
|
|
Loading…
Reference in a new issue