Skip to content

Commit

Permalink
Fix crashing ui bug
Browse files Browse the repository at this point in the history
  • Loading branch information
levonpetrosyan93 committed Jan 18, 2024
1 parent 9e8a77f commit 29c51a5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/qt/walletmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1547,18 +1547,19 @@ WalletModel::SendCoinsReturn WalletModel::mintSparkCoins(std::vector<WalletModel
auto reservekey = reserveKeys.begin();

for (size_t i = 0; i != wtxAndFee.size(); i++) {
if (!wallet->CommitTransaction(wtxAndFee[i].first, *reservekey++, g_connman.get(), state))
return SendCoinsReturn(TransactionCommitFailed, QString::fromStdString(state.GetRejectReason()));

Q_FOREACH(const SendCoinsRecipient &rcp, transactions[i].getRecipients())
{
// CWalletTx* newTx = transactions[i].getTransaction();
if (!rcp.message.isEmpty()) // Message from normal firo:URI (firo:123...?message=example)
wtxAndFee[i].first.vOrderForm.push_back(make_pair("Message", rcp.message.toStdString()));
if (!wallet->CommitTransaction(wtxAndFee[i].first, *reservekey++, g_connman.get(), state))
return SendCoinsReturn(TransactionCommitFailed, QString::fromStdString(state.GetRejectReason()));


CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
ssTx << *wtxAndFee[i].first.tx;
transaction_array.append(&(ssTx[0]), ssTx.size());

{
std::string strAddress = rcp.address.toStdString();
std::string strLabel = rcp.label.toStdString();
Expand Down

0 comments on commit 29c51a5

Please sign in to comment.