read the cid from headermemo into qstring

This commit is contained in:
DenioD
2020-05-01 13:15:05 +02:00
parent b9dab96b87
commit 4afd49d0a7

View File

@@ -885,7 +885,7 @@ void Controller::refreshTransactions() {
address,
QString(""),
memo,
"", // we have to set the cid here,
"", // we have to set the cid here, its included in our Addressbook for this contact
txid
// true // is an outgoing message
);
@@ -924,21 +924,30 @@ void Controller::refreshTransactions() {
if (!it["memo"].is_null()) {
memo = QString::fromStdString(it["memo"]);
}
TransactionItem tx{
"Receive", datetime, address, txid,confirmations, items
};
txdata.push_back(tx);
QString cid;
if (memo.startsWith("{")) {
cid = memo.mid(14,36);
}else{ cid = "";}
ChatItem item = ChatItem(
datetime,
address,
QString(""),
memo,
"", // we have to set the cid here
cid, // we have to set the cid here, its included in the headermemo
txid
);
qDebug()<<cid;
qDebug()<<txid;
chatModel->addMessage(item);
items.push_back(TransactionItemDetail{