Browse Source

Grab the input text for sending a memo

chat
Duke Leto 4 years ago
parent
commit
51cc069812
  1. 5
      src/mainwindow.cpp

5
src/mainwindow.cpp

@ -189,14 +189,15 @@ void MainWindow::sendMemo() {
//TODO: cid=random int64 or sha256
QString cid = QString::number( time(NULL) % std::rand() ); // low entropy for testing!
QString hmemo= createHeaderMemo(cid,chat.getMyZaddr());
// TODO: look up input text to add to memo
QString memo = "";
QString memo = ui->textEdit->toPlainText();
QString addr = contact.getZaddr();
// we send a header memo plus actual memo
tx.toAddrs.push_back( ToFields{addr, amount, hmemo, hmemo.toUtf8().toHex()} );
tx.toAddrs.push_back( ToFields{addr, amount, memo, memo.toUtf8().toHex()} );
qDebug() << "Sending "<< addr << " a memo: " << memo;
QString error = doSendTxValidations(tx);
if (!error.isEmpty()) {
// Something went wrong, so show an error and exit

Loading…
Cancel
Save