From b9daab8e8b0637922be5d6810db7cc1b68d8c4f8 Mon Sep 17 00:00:00 2001 From: Bytecoin Developer Date: Tue, 22 May 2018 15:51:19 +0300 Subject: [PATCH] Add the batch of release v3.1.0 commits --- ReleaseNotes.md | 7 +- Windows Installer/Installer.vdproj | 14 ++-- Windows Installer/Installer32.vdproj | 14 ++-- src/JsonRpc/JsonRpcClient.cpp | 117 +++++++++++++++++++++------ src/JsonRpc/JsonRpcClient.h | 45 +++-------- src/bytecoin-gui.pro | 2 +- src/mainwindow.cpp | 1 + src/rpcapi.h | 19 +++-- src/version.h | 4 +- src/walletmodel.cpp | 60 +++++--------- 10 files changed, 157 insertions(+), 126 deletions(-) diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 6bdcb13..ee2402c 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,8 +1,13 @@ ## Release Notes +### v3.1.0 + +- Increment the major version to conform with the daemon versioning. +- Updated the Bytecoin daemons. + ### v2.0.4 -- Updated Bytecoin daemons. +- Updated the Bytecoin daemons. - Fixed window file path on MacOS. - Fixed bug in transaction list. - Fixed minor GUI fixes. diff --git a/Windows Installer/Installer.vdproj b/Windows Installer/Installer.vdproj index 983703d..5c4e85a 100644 --- a/Windows Installer/Installer.vdproj +++ b/Windows Installer/Installer.vdproj @@ -1483,23 +1483,23 @@ { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:Bytecoin" - "ProductCode" = "8:{5474A905-4D3C-41AF-84CE-A5A0364CA5AE}" - "PackageCode" = "8:{EE7D4D39-E381-4011-ABFE-284DB213F964}" + "ProductCode" = "8:{74A885F4-73BC-48E5-AE9D-31B32EBA01EF}" + "PackageCode" = "8:{2C5C62F2-9B6B-49F8-A503-8A34097B2536}" "UpgradeCode" = "8:{DC5C7D60-BB08-4B97-B634-E87679CCEB3C}" "AspNetVersion" = "8:" "RestartWWWService" = "11:FALSE" "RemovePreviousVersions" = "11:TRUE" "DetectNewerInstalledVersion" = "11:TRUE" "InstallAllUsers" = "11:FALSE" - "ProductVersion" = "8:18.4.4" + "ProductVersion" = "8:18.5.21" "Manufacturer" = "8:Bytecoin Developers" "ARPHELPTELEPHONE" = "8:" "ARPHELPLINK" = "8:" - "Title" = "8:Bytecoin 2.0.2 Installer" + "Title" = "8:Bytecoin 3.1.0 Installer" "Subject" = "8:" "ARPCONTACT" = "8:Bytecoin Developers" "Keywords" = "8:" - "ARPCOMMENTS" = "8:Release version of bytecoin from 4 April 2018" + "ARPCOMMENTS" = "8:Release version of bytecoin from 21 May 2018" "ARPURLINFOABOUT" = "8:https://bytecoin.org" "ARPPRODUCTICON" = "8:_ABCF8F071D16461785EDF6D56ED2ABCE" "ARPIconIndex" = "3:0" @@ -1706,7 +1706,7 @@ "ContextData" = "8:" "Attributes" = "3:0" "Setting" = "3:2" - "Value" = "8:Release version 2.0.2 of bytecoin core and GUI wallet from 2018/04/04." + "Value" = "8:Release version 3.1.0 of bytecoin core and GUI wallet from 2018/05/21." "DefaultValue" = "8:#1202" "UsePlugInResources" = "11:TRUE" } @@ -1945,7 +1945,7 @@ "ContextData" = "8:" "Attributes" = "3:0" "Setting" = "3:2" - "Value" = "8:Release version 2.0.2 of bytecoin core and GUI wallet from 2018/04/04." + "Value" = "8:Release version 3.1.0 of bytecoin core and GUI wallet from 2018/05/21." "DefaultValue" = "8:#1202" "UsePlugInResources" = "11:TRUE" } diff --git a/Windows Installer/Installer32.vdproj b/Windows Installer/Installer32.vdproj index 22a8e5b..6623226 100644 --- a/Windows Installer/Installer32.vdproj +++ b/Windows Installer/Installer32.vdproj @@ -1483,23 +1483,23 @@ { "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:Bytecoin" - "ProductCode" = "8:{6520DE51-70F3-48E2-BA6D-0FAFCBC4E56D}" - "PackageCode" = "8:{61DFFA9D-888A-4916-A0AE-3E3AF727ACD4}" + "ProductCode" = "8:{F957B4C2-A6B6-42FB-91B5-D7679BC27EBB}" + "PackageCode" = "8:{FD11C38A-D7DB-45B1-8DA6-77246C4ECD9E}" "UpgradeCode" = "8:{DC5C7D60-BB08-4B97-B634-E87679CCEB3C}" "AspNetVersion" = "8:" "RestartWWWService" = "11:FALSE" "RemovePreviousVersions" = "11:TRUE" "DetectNewerInstalledVersion" = "11:TRUE" "InstallAllUsers" = "11:FALSE" - "ProductVersion" = "8:18.4.4" + "ProductVersion" = "8:18.5.21" "Manufacturer" = "8:Bytecoin Developers" "ARPHELPTELEPHONE" = "8:" "ARPHELPLINK" = "8:" - "Title" = "8:32-bit Bytecoin 2.0.2 Installer" + "Title" = "8:32-bit Bytecoin 3.1.0 Installer" "Subject" = "8:" "ARPCONTACT" = "8:Bytecoin Developers" "Keywords" = "8:" - "ARPCOMMENTS" = "8:32-bit release version of bytecoin from 4 April 2018" + "ARPCOMMENTS" = "8:32-bit release version of bytecoin from 21 May 2018" "ARPURLINFOABOUT" = "8:https://bytecoin.org" "ARPPRODUCTICON" = "8:_A84FAE3CB14C4108B5D13DF9AD54E661" "ARPIconIndex" = "3:0" @@ -1706,7 +1706,7 @@ "ContextData" = "8:" "Attributes" = "3:0" "Setting" = "3:2" - "Value" = "8:32-bit release version 2.0.2 of bytecoin core and GUI wallet from 2018/04/04." + "Value" = "8:32-bit release version 3.1.0 of bytecoin core and GUI wallet from 2018/05/21." "DefaultValue" = "8:#1202" "UsePlugInResources" = "11:TRUE" } @@ -1945,7 +1945,7 @@ "ContextData" = "8:" "Attributes" = "3:0" "Setting" = "3:2" - "Value" = "8:32-bit release version 2.0.2 of bytecoin core and GUI wallet from 2018/04/04." + "Value" = "8:32-bit release version 3.1.0 of bytecoin core and GUI wallet from 2018/05/21." "DefaultValue" = "8:#1202" "UsePlugInResources" = "11:TRUE" } diff --git a/src/JsonRpc/JsonRpcClient.cpp b/src/JsonRpc/JsonRpcClient.cpp index f36a5d9..6581312 100644 --- a/src/JsonRpc/JsonRpcClient.cpp +++ b/src/JsonRpc/JsonRpcClient.cpp @@ -163,22 +163,23 @@ void Client::replyFinished(QNetworkReply* reply) { const JsonRpcResponse& response = static_cast(*jsonRpcObject); auto it = responseHandlers_.find(response.getId()); - if (response.isErrorResponse()) - { - qDebug("[JsonRpcClient] Error response for %s id. %s", qPrintable(response.getId()), qPrintable(response.getErrorMessage())); - if (it != responseHandlers_.end()) - responseHandlers_.erase(it); - emit jsonErrorResponse(response.getId(), response.getErrorMessage()); - return; - } +// if (response.isErrorResponse()) +// { +// qDebug("[JsonRpcClient] Error response for %s id. %s", qPrintable(response.getId()), qPrintable(response.getErrorMessage())); +// if (it != responseHandlers_.end()) +// responseHandlers_.erase(it); +// emit jsonErrorResponse(response.getId(), response.getErrorMessage()); +// return; +// } if (it == responseHandlers_.end()) { qDebug("[JsonRpcClient] Cannot find handler for id '%s'.", qPrintable(response.getId())); emit jsonUnknownMessageId(response.getId()); return; } - const QVariantMap result = response.getResultAsObject(); - it.value()(result); +// const QVariantMap result = response.getResultAsObject(); +// it.value()(result); + it.value()(response); responseHandlers_.erase(it); } } @@ -289,52 +290,120 @@ void WalletClient::sendCheckProof(const RpcApi::CheckSendProof::Request& req) insertResponseHandler(requestID, std::bind(&WalletClient::checkProofHandler, this, _1)); } -void WalletClient::statusHandler(const QVariantMap& result) const +void WalletClient::statusHandler(const JsonRpcResponse& response) { + if (response.isErrorResponse()) + { + qDebug("[JsonRpcClient] Error response for %s id. %s", qPrintable(response.getId()), qPrintable(response.getErrorMessage())); + emit jsonErrorResponse(response.getId(), response.getErrorMessage()); + return; + } + + const QVariantMap result = response.getResultAsObject(); emit statusReceived(RpcApi::Status::fromJson(result)); } -void WalletClient::transfersHandler(const QVariantMap& result) const +void WalletClient::transfersHandler(const JsonRpcResponse& response) { + if (response.isErrorResponse()) + { + qDebug("[JsonRpcClient] Error response for %s id. %s", qPrintable(response.getId()), qPrintable(response.getErrorMessage())); + emit jsonErrorResponse(response.getId(), response.getErrorMessage()); + return; + } + + const QVariantMap result = response.getResultAsObject(); emit transfersReceived(RpcApi::Transfers::fromJson(result)); } -void WalletClient::addressesHandler(const QVariantMap& result) const + +void WalletClient::addressesHandler(const JsonRpcResponse& response) { + if (response.isErrorResponse()) + { + qDebug("[JsonRpcClient] Error response for %s id. %s", qPrintable(response.getId()), qPrintable(response.getErrorMessage())); + emit jsonErrorResponse(response.getId(), response.getErrorMessage()); + return; + } + + const QVariantMap result = response.getResultAsObject(); emit addressesReceived(RpcApi::Addresses::fromJson(result)); } -void WalletClient::balanceHandler(const QVariantMap& result) const +void WalletClient::balanceHandler(const JsonRpcResponse& response) { + if (response.isErrorResponse()) + { + qDebug("[JsonRpcClient] Error response for %s id. %s", qPrintable(response.getId()), qPrintable(response.getErrorMessage())); + emit jsonErrorResponse(response.getId(), response.getErrorMessage()); + return; + } + + const QVariantMap result = response.getResultAsObject(); emit balanceReceived(RpcApi::Balance::fromJson(result)); } -//void WalletClient::unspentHandler(const QVariantMap& result) const -//{ -// emit unspentReceived(RpcApi::Unspents::fromJson(result)); -//} - -void WalletClient::createTxHandler(const QVariantMap& result) const +void WalletClient::createTxHandler(const JsonRpcResponse& response) { + if (response.isErrorResponse()) + { + qDebug("[JsonRpcClient] Error response for %s id. %s", qPrintable(response.getId()), qPrintable(response.getErrorMessage())); + emit jsonErrorResponse(response.getId(), response.getErrorMessage()); + return; + } + + const QVariantMap result = response.getResultAsObject(); emit createTxReceived(RpcApi::CreatedTx::fromJson(result)); } -void WalletClient::sendTxHandler(const QVariantMap& result) const +void WalletClient::sendTxHandler(const JsonRpcResponse& response) { + if (response.isErrorResponse()) + { + qDebug("[JsonRpcClient] Error response for %s id. %s", qPrintable(response.getId()), qPrintable(response.getErrorMessage())); + emit jsonErrorResponse(response.getId(), response.getErrorMessage()); + return; + } + + const QVariantMap result = response.getResultAsObject(); emit sendTxReceived(RpcApi::SentTx::fromJson(result)); } -void WalletClient::viewKeyHandler(const QVariantMap& result) const +void WalletClient::viewKeyHandler(const JsonRpcResponse& response) { + if (response.isErrorResponse()) + { + qDebug("[JsonRpcClient] Error response for %s id. %s", qPrintable(response.getId()), qPrintable(response.getErrorMessage())); + emit jsonErrorResponse(response.getId(), response.getErrorMessage()); + return; + } + + const QVariantMap result = response.getResultAsObject(); emit viewKeyReceived(RpcApi::ViewKey::fromJson(result)); } -void WalletClient::proofsHandler(const QVariantMap &result) const +void WalletClient::proofsHandler(const JsonRpcResponse& response) { + if (response.isErrorResponse()) + { + qDebug("[JsonRpcClient] Error response for %s id. %s", qPrintable(response.getId()), qPrintable(response.getErrorMessage())); + emit jsonErrorResponse(response.getId(), response.getErrorMessage()); + return; + } + + const QVariantMap result = response.getResultAsObject(); emit proofsReceived(RpcApi::Proofs::fromJson(result)); } -void WalletClient::checkProofHandler(const QVariantMap& result) const +void WalletClient::checkProofHandler(const JsonRpcResponse& response) { + if (response.isErrorResponse()) + { + RpcApi::ProofCheck pc{response.getErrorMessage()}; + emit checkProofReceived(pc); + return; + } + + const QVariantMap result = response.getResultAsObject(); emit checkProofReceived(RpcApi::ProofCheck::fromJson(result)); } diff --git a/src/JsonRpc/JsonRpcClient.h b/src/JsonRpc/JsonRpcClient.h index 67b003a..648e072 100644 --- a/src/JsonRpc/JsonRpcClient.h +++ b/src/JsonRpc/JsonRpcClient.h @@ -19,7 +19,6 @@ #include "JsonRpcNotification.h" #include "JsonRpcObjectFactory.h" #include "rpcapi.h" -//#include "bytecoin/rpc_api.h" namespace JsonRpc { @@ -29,7 +28,7 @@ class Client : public QObject Q_DISABLE_COPY(Client) public: - typedef std::function FunctionHandler; + typedef std::function FunctionHandler; Client(QObject* parent = 0); Client(const QUrl& url, QObject* parent = 0); @@ -105,38 +104,16 @@ class WalletClient : public Client void checkProofReceived(const RpcApi::ProofCheck& result) const; private: - void statusHandler(const QVariantMap& result) const; - void transfersHandler(const QVariantMap& result) const; - void addressesHandler(const QVariantMap& result) const; - void balanceHandler(const QVariantMap& result) const; - void viewKeyHandler(const QVariantMap& result) const; -// void unspentHandler(const QVariantMap& result) const; - void createTxHandler(const QVariantMap& result) const; - void sendTxHandler(const QVariantMap& result) const; - void proofsHandler(const QVariantMap& result) const; - void checkProofHandler(const QVariantMap& result) const; + void statusHandler(const JsonRpcResponse& response); + void transfersHandler(const JsonRpcResponse& response); + void addressesHandler(const JsonRpcResponse& response); + void balanceHandler(const JsonRpcResponse& response); + void viewKeyHandler(const JsonRpcResponse& response); +// void unspentHandler(const JsonRpcResponse& response); + void createTxHandler(const JsonRpcResponse& response); + void sendTxHandler(const JsonRpcResponse& response); + void proofsHandler(const JsonRpcResponse& response); + void checkProofHandler(const JsonRpcResponse& response); }; -//class StratumClient : public Client -//{ -// Q_OBJECT -// Q_DISABLE_COPY(StratumClient) - -//public: -// StratumClient(const QUrl& url, QObject* parent = 0); - -// void sendLogin(const QString& login, const QString& password, quint32 difficulty); -// void sendSubmit(const QString& jobId, quint32 nonce, const QByteArray& result); - -//Q_SIGNALS: -// void loginReceived(const QVariantMap& result) const; -// void submitReceived(const QVariantMap& result) const; -// void jobReceived(const QVariantMap& result) const; - -//private: -// void loginHandler(const QVariantMap& result) const; -// void submitHandler(const QVariantMap& result) const; -// void jobHandler(const QVariantMap& result) const; -//}; - } diff --git a/src/bytecoin-gui.pro b/src/bytecoin-gui.pro index 0a1b9c2..6047039 100644 --- a/src/bytecoin-gui.pro +++ b/src/bytecoin-gui.pro @@ -15,7 +15,7 @@ TEMPLATE = app macx: QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.11 macx: ICON = images/bytecoin.icns win32: RC_ICONS = images/bytecoin.ico -win32: VERSION = 2.18.5.9 +win32: VERSION = 3.18.5.21 #QMAKE_CXXFLAGS += -fno-omit-frame-pointer -fsanitize=address,undefined #LIBS += -lasan -lubsan diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 02ddd82..16c6426 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -169,6 +169,7 @@ void MainWindow::createTx(const RpcApi::Transaction& tx, quint64 fee) req.change_address = getAddress(); req.confirmed_height_or_depth = -static_cast(CONFIRMATIONS) - 1; req.fee_per_byte = fee; + req.save_history = true; emit createTxSignal(req, QPrivateSignal{}); } diff --git a/src/rpcapi.h b/src/rpcapi.h index 0a4269b..2b361a4 100644 --- a/src/rpcapi.h +++ b/src/rpcapi.h @@ -21,6 +21,7 @@ typedef quint64 Timestamp; typedef qint64 SignedAmount; typedef qint32 HeightOrDepth; typedef quint64 UnlockMoment; // Height or Timestamp, +typedef QString Hash; constexpr HeightOrDepth DEFAULT_CONFIRMATIONS = 5; @@ -86,10 +87,10 @@ struct Transaction { UnlockMoment unlock_time = 0; QList transfers; - QString payment_id{}; + Hash payment_id{}; quint32 anonymity = 0; - QString hash{}; + Hash hash{}; SignedAmount fee = 0; QString public_key; QString extra; @@ -97,7 +98,7 @@ struct Transaction Amount amount = 0; Height block_height = 0; - QString block_hash{}; + Hash block_hash{}; QDateTime timestamp; static Transaction fromJson(const QVariantMap& json); @@ -127,11 +128,11 @@ struct BlockHeader quint8 major_version = 0; quint8 minor_version = 0; QDateTime timestamp; - QString previous_block_hash{}; + Hash previous_block_hash{}; quint32 nonce = 0; Height height = 0; - QString hash{}; + Hash hash{}; Amount reward = 0; Difficulty cumulative_difficulty = 0; Difficulty difficulty = 0; @@ -216,7 +217,7 @@ struct GetStatus struct Request { - QString top_block_hash{}; + Hash top_block_hash{}; quint32 transaction_pool_version = 0; quint32 outgoing_peer_count = 0; quint32 incoming_peer_count = 0; @@ -227,7 +228,7 @@ struct GetStatus struct Response { - QString top_block_hash = 0; + Hash top_block_hash = 0; quint32 transaction_pool_version = 0; quint32 outgoing_peer_count = 0; quint32 incoming_peer_count = 0; @@ -383,6 +384,7 @@ struct CreateTransaction SignedAmount fee_per_byte = 0; QString optimization; bool save_history = true; + QList prevent_conflict_with_transactions; QVariantMap toJson() const; }; @@ -392,6 +394,7 @@ struct CreateTransaction QString binary_transaction; Transaction transaction; bool save_history_error = false; + QList transactions_required; static Response fromJson(const QVariantMap& json); }; @@ -422,7 +425,7 @@ struct CreateSendProof struct Request { - QString transaction_hash; + Hash transaction_hash; QString message; QStringList addresses; diff --git a/src/version.h b/src/version.h index 765bfb8..63d3515 100644 --- a/src/version.h +++ b/src/version.h @@ -1,8 +1,8 @@ #ifndef VERSION_H #define VERSION_H -constexpr char VERSION[] = "2.0.4"; +constexpr char VERSION[] = "3.1.0"; constexpr char VERSION_SUFFIX[] = "stable"; -constexpr char REVISION[] = "20180509"; +constexpr char REVISION[] = "20180521"; #endif // VERSION_H diff --git a/src/walletmodel.cpp b/src/walletmodel.cpp index e21ac0d..8914263 100644 --- a/src/walletmodel.cpp +++ b/src/walletmodel.cpp @@ -193,63 +193,39 @@ void WalletModel::addressesReceived(const RpcApi::Addresses& response) void WalletModel::transfersReceived(const RpcApi::Transfers& history) { const quint32 highestConfirmedBlock = getHighestKnownConfirmedBlock(); -// const quint32 highestConfirmedBlock = pimpl_->highestConfirmedBlockDuringRequest; -// QList txs; -// QList unconfirmedTxs; -// for (const RpcApi::Block& block : history.blocks) -// { -// if (block.header.height > highestConfirmedBlock) -// unconfirmedTxs.append(block.transactions); -// else -// txs.append(block.transactions); -// } -// QList newTxs = unconfirmedTxs; -// newTxs.append(txs); -// newTxs.append(pimpl_->txs.mid(pimpl_->unconfirmedSize)); // cut unconfirmed and save confirmed only - -// pimpl_->unconfirmedSize = unconfirmedTxs.size(); -// containerReceived(pimpl_->txs, newTxs, pimpl_->addresses.size()); - if (history.next_from_height >= highestConfirmedBlock) // unconfirmed { -// pimpl_->txs.erase(pimpl_->txs.begin(), pimpl_->txs.begin() + pimpl_->unconfirmedSize); -// pimpl_->unconfirmedSize = 0; - - QList txs; + QList rcvdTxs; for (const RpcApi::Block& block : history.blocks) - txs.append(block.transactions); + rcvdTxs.append(block.transactions); - if (txs == pimpl_->txs.mid(0, pimpl_->unconfirmedSize)) + if (rcvdTxs == pimpl_->txs.mid(0, pimpl_->unconfirmedSize)) return; const QList& confirmedTxs = pimpl_->txs.mid(pimpl_->unconfirmedSize); - pimpl_->unconfirmedSize = txs.size(); - txs.append(confirmedTxs); - containerReceived(pimpl_->txs, txs, pimpl_->addresses.size()); + pimpl_->unconfirmedSize = rcvdTxs.size(); + rcvdTxs.append(confirmedTxs); + containerReceived(pimpl_->txs, rcvdTxs, pimpl_->addresses.size()); } else if (history.next_to_height < highestConfirmedBlock) // confirmed { -// pimpl_->txs.erase(pimpl_->txs.begin(), pimpl_->txs.begin() + pimpl_->unconfirmedSize); -// pimpl_->unconfirmedSize = 0; - - QList txs; + QList rcvdTxs; for (const RpcApi::Block& block : history.blocks) - txs.append(block.transactions); + rcvdTxs.append(block.transactions); - if (txs.empty()) + if (rcvdTxs.empty()) return; - if (txs.first().block_height < getBottomConfirmedBlock()) + if (rcvdTxs.first().block_height < getBottomConfirmedBlock()) { QList newTxs = pimpl_->txs; - newTxs.append(txs); + newTxs.append(rcvdTxs); containerReceived(pimpl_->txs, newTxs, pimpl_->addresses.size()); pimpl_->canFetchMore = history.next_to_height != 0; } - else if (txs.last().block_height > getTopConfirmedBlock()) + else if (rcvdTxs.last().block_height > getTopConfirmedBlock()) { QList newTxs = pimpl_->txs.mid(0, pimpl_->unconfirmedSize); - newTxs.append(txs); -// QList newTxs = txs; + newTxs.append(rcvdTxs); newTxs.append(pimpl_->txs.mid(pimpl_->unconfirmedSize)); containerReceived(pimpl_->txs, newTxs, pimpl_->addresses.size()); } @@ -373,11 +349,11 @@ void WalletModel::balanceReceived(const RpcApi::Balance& balance) << ROLE_LOCKED_OR_UNCONFIRMED << ROLE_TOTAL; - qDebug("[WalletModel] Balance changed.\n\tSpendable: %s\n\tSpendable dust: %s\n\tLocked or unconfirmed: %s\n\tTotal: %s", - qPrintable(formatUnsignedAmount(balance.spendable)), - qPrintable(formatUnsignedAmount(balance.spendable_dust)), - qPrintable(formatUnsignedAmount(balance.locked_or_unconfirmed)), - qPrintable(formatUnsignedAmount(balance.spendable + balance.spendable_dust + balance.locked_or_unconfirmed))); +// qDebug("[WalletModel] Balance changed.\n\tSpendable: %s\n\tSpendable dust: %s\n\tLocked or unconfirmed: %s\n\tTotal: %s", +// qPrintable(formatUnsignedAmount(balance.spendable)), +// qPrintable(formatUnsignedAmount(balance.spendable_dust)), +// qPrintable(formatUnsignedAmount(balance.locked_or_unconfirmed)), +// qPrintable(formatUnsignedAmount(balance.spendable + balance.spendable_dust + balance.locked_or_unconfirmed))); emit dataChanged(index(0, COLUMN_SPENDABLE), index(0, COLUMN_TOTAL), changedRoles); }