show assetlabel in listunspent if set

This commit is contained in:
Gregory Sanders 2017-03-30 10:11:41 -04:00
parent 6c4b6b9f04
commit 31bc28858d

View file

@ -2833,6 +2833,10 @@ UniValue listunspent(const JSONRPCRequest& request)
if (out.tx->tx->vout[out.i].nAsset.IsCommitment()) {
entry.push_back(Pair("assetcommitment", HexStr(out.tx->tx->vout[out.i].nAsset.vchCommitment)));
}
const std::string label = gAssetsDir.GetLabel(assetid);
if (label != "") {
entry.push_back(Pair("assetlabel", label));
}
entry.push_back(Pair("confirmations", out.nDepth));
entry.push_back(Pair("spendable", out.fSpendable));
entry.push_back(Pair("solvable", out.fSolvable));