From c525b44a6cfd7e1e9e26c2ef9c2297ec9adbe920 Mon Sep 17 00:00:00 2001 From: DenioD <41270280+DenioD@users.noreply.github.com> Date: Wed, 22 Jan 2020 07:19:58 +0100 Subject: [PATCH] improve format of sendmanyTx --- src/websockets.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/websockets.cpp b/src/websockets.cpp index a591fd0..852a553 100644 --- a/src/websockets.cpp +++ b/src/websockets.cpp @@ -814,13 +814,18 @@ void AppDataServer::processSendManyTx(QJsonObject sendmanyTx, MainWindow* mainwi // Sort z addresses first return a.first > b.first; }); + + //send to more then one Receipent + int totalSendManyItems = sendmanyTx.size(); for (int i=0; i < totalSendManyItems; i++) { amt = CAmount::fromDecimalString(sendmanyTx["amount"].toString() % QString::number(i+1)); + QString addr = sendmanyTx["to"].toString() % QString::number(i+1); + QString memo = sendmanyTx["memo"].toString() % QString::number(i+1); tx.fromAddr = bals[0].first; - tx.toAddrs = { ToFields{ sendmanyTx["to"].toString() % QString::number(i+1), amt, sendmanyTx["memo"].toString() % QString::number(i+1)} }; //send to more then one + tx.toAddrs = { ToFields{ addr, amt, memo} }; } // TODO: Respect the autoshield change setting