|
@ -241,15 +241,17 @@ void MainWindow::renderContactRequest(){ |
|
|
AddressBook::getInstance()->addAddressLabel(newLabel, addr, myAddr, cid, avatar); |
|
|
AddressBook::getInstance()->addAddressLabel(newLabel, addr, myAddr, cid, avatar); |
|
|
|
|
|
|
|
|
QMessageBox::information(this, "Added Contact","successfully added your new contact. You can now Chat with this contact"); |
|
|
QMessageBox::information(this, "Added Contact","successfully added your new contact. You can now Chat with this contact"); |
|
|
|
|
|
rpc->refreshContacts( |
|
|
|
|
|
ui->listContactWidget |
|
|
|
|
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
dialog.exec(); |
|
|
dialog.exec(); |
|
|
|
|
|
|
|
|
rpc->refreshContacts( |
|
|
|
|
|
ui->listContactWidget |
|
|
|
|
|
|
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void ChatModel::addCid(QString tx, QString cid) |
|
|
void ChatModel::addCid(QString tx, QString cid) |
|
@ -376,9 +378,6 @@ Tx MainWindow::createTxFromChatPage() { |
|
|
QString hmemo= createHeaderMemo(type,cid,myAddr); |
|
|
QString hmemo= createHeaderMemo(type,cid,myAddr); |
|
|
QString memo = ui->memoTxtChat->toPlainText().trimmed(); |
|
|
QString memo = ui->memoTxtChat->toPlainText().trimmed(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tx.toAddrs.push_back(ToFields{addr, amt, hmemo}); |
|
|
tx.toAddrs.push_back(ToFields{addr, amt, hmemo}); |
|
|
tx.toAddrs.push_back(ToFields{addr, amt, memo}); |
|
|
tx.toAddrs.push_back(ToFields{addr, amt, memo}); |
|
|
|
|
|
|
|
@ -547,7 +546,8 @@ void::MainWindow::addContact() |
|
|
request.setupUi(&dialog); |
|
|
request.setupUi(&dialog); |
|
|
Settings::saveRestore(&dialog); |
|
|
Settings::saveRestore(&dialog); |
|
|
|
|
|
|
|
|
|
|
|
try |
|
|
|
|
|
{ |
|
|
bool sapling = true; |
|
|
bool sapling = true; |
|
|
rpc->createNewZaddr(sapling, [=] (json reply) { |
|
|
rpc->createNewZaddr(sapling, [=] (json reply) { |
|
|
QString myAddr = QString::fromStdString(reply.get<json::array_t>()[0]); |
|
|
QString myAddr = QString::fromStdString(reply.get<json::array_t>()[0]); |
|
@ -558,11 +558,23 @@ void::MainWindow::addContact() |
|
|
qDebug() << "new generated myAddr add Contact" << myAddr; |
|
|
qDebug() << "new generated myAddr add Contact" << myAddr; |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
}catch(...) |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
qDebug() << QString("Caught something nasty with myZaddr Contact"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
QString cid = QUuid::createUuid().toString(QUuid::WithoutBraces); |
|
|
QString cid = QUuid::createUuid().toString(QUuid::WithoutBraces); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QObject::connect(request.sendRequestButton, &QPushButton::clicked, [&] () { |
|
|
QObject::connect(request.sendRequestButton, &QPushButton::clicked, [&] () { |
|
|
|
|
|
|
|
|
QString addr = request.zaddr->text(); |
|
|
QString addr = request.zaddr->text(); |
|
|