Skip to content
Snippets Groups Projects
Commit 4ea30c1a authored by denis's avatar denis
Browse files

Merge branch 'release-3.1-7' of...

Merge branch 'release-3.1-7' of https://gitlab.demlabs.net/cellframe/cellframe-ui-sdk into bugs-14194
parents 8f47bdaa 25cbc620
3 merge requests!275Master port,!266Release 3.1 7,!263Bugs 14194
......@@ -90,6 +90,7 @@ QString DapGetAllWalletHistoryCommandBase::getHistory(const QString& net, const
bool isReward = dataTransaction.contains(typeHistoryData::REWARD);
bool isRewardFee = dataTransaction.contains(typeHistoryData::FEE_REWARD);
bool isXChange = dataTransaction.contains(typeHistoryData::XCHANGE);
bool isVote = dataTransaction.contains(typeHistoryData::VOTE);
if(isReward)
{
......@@ -126,7 +127,12 @@ QString DapGetAllWalletHistoryCommandBase::getHistory(const QString& net, const
txHeader.insert(FEE_KEY, dataTransaction[typeHistoryData::VALIDATOR].value);
}
if(isValidator && !isStateLock && !isEmission && !isNullAddr && !isBase && !isServicePay && !isReward)
if(isVote)
{
txHeader.insert(STATUS_KEY, "Vote");
}
if(isValidator && !isStateLock && !isEmission && !isNullAddr && !isBase && !isServicePay && !isReward && !isVote)
{
txHeader.insert(STATUS_KEY, "Unknown");
}
......@@ -262,6 +268,8 @@ QString DapGetAllWalletHistoryCommandBase::getHistory(const QString& net, const
txHeader.insert(FEE_NET_KEY, "0.0");
txHeader.insert(M_VALUE_KEY, "0.0");
QString action = txObj["action"].toString();
QJsonArray txItemsArray = txObj["data"].toArray();
for(const auto &arrVal: txItemsArray)
{
......@@ -280,6 +288,14 @@ QString DapGetAllWalletHistoryCommandBase::getHistory(const QString& net, const
{
dataTransaction.insert(typeHistoryData::VALIDATOR, data);
}
if(action == "use")// vote //todo optimize
{
if(!dataTransaction.contains(typeHistoryData::VOTE))
{
dataTransaction.insert(typeHistoryData::VOTE, HistoryData({}));
}
}
}
else if(data.address == SRV_XCHANGE)
{
......
......@@ -178,7 +178,8 @@ protected:
REWARD,
FEE_REWARD,
XCHANGE,
SRV_PAY
SRV_PAY,
VOTE
};
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment