Browse Source

Use a fixed reply zaddr to enable more testing

First HushChat sent from the SD GUI sent with this commit!

https://explorer.myhush.org/tx/469cdf27a697e9b3f846475b81c26ac876c9f50e5e705417a56400aa6af62418

Currently the GUI confirms the tx first, which is good for testing.
chat
Duke Leto 4 years ago
parent
commit
1b3147118f
  1. 14
      src/mainwindow.cpp

14
src/mainwindow.cpp

@ -205,12 +205,16 @@ void MainWindow::sendMemo() {
HushContact contact = chat.getContact();
//TODO: verify we currently own the private key to this zaddr via z_validateaddress
tx.fromAddr = chat.getMyZaddr();
if(tx.fromAddr.isEmpty()) {
// TODO: we must update our addressbook to store a custom zaddr for each contact, until then
// make HushChat use the Duke feedback zaddr as reply zaddr
tx.fromAddr = "zs1aq4xnrkjlnxx0zesqye7jz3dfrf3rjh7q5z6u8l6mwyqqaam3gx3j2fkqakp33v93yavq46j83q";
}
double amount = 0;
//QString cid = QString::number( time(NULL) % std::rand() ); // low entropy for testing!
QString cid = QUuid::createUuid().toString(QUuid::WithoutBraces);
QString hmemo= createHeaderMemo(cid,chat.getMyZaddr());
QString memo = ui->textEdit->toPlainText();
QString addr = contact.getZaddr();
QString cid = QUuid::createUuid().toString(QUuid::WithoutBraces);
QString hmemo = createHeaderMemo(cid,chat.getMyZaddr());
QString memo = ui->textEdit->toPlainText();
QString addr = contact.getZaddr();
QModelIndex qmi = ui->contactsView->currentIndex();
if (qmi.isValid()) {

Loading…
Cancel
Save