Browse Source

Start creating the hushchat memo our new way

chat
Duke Leto 4 years ago
parent
commit
41b17cdd5a
  1. 10
      src/mainwindow.cpp
  2. 11
      src/mainwindow.h

10
src/mainwindow.cpp

@ -149,7 +149,15 @@ MainWindow::MainWindow(QWidget *parent) :
// Send button clicked
void MainWindow::sendMemo() {
Tx tx = createTxFromSendPage();
Tx tx;
tx.fee = Settings::getMinerFee();
// TODO: choose current zaddr for this contact
tx.fromAddr = ui->inputsCombo->currentText();
double amount = 0;
// TODO: look up input text to add to memo
QString memo = "";
QString addr;
tx.toAddrs.push_back( ToFields{addr, amount, memo, memo.toUtf8().toHex()} );
QString error = doSendTxValidations(tx);
if (!error.isEmpty()) {

11
src/mainwindow.h

@ -31,6 +31,16 @@ namespace Ui {
class MainWindow;
}
class HushContact
{
public:
QString name();
void setName();
private:
};
class MainWindow : public QMainWindow
{
Q_OBJECT
@ -140,6 +150,7 @@ private:
WSServer* wsserver = nullptr;
WormholeClient* wormhole = nullptr;
HushContact currentContact;
RPC* rpc = nullptr;
QCompleter* labelCompleter = nullptr;

Loading…
Cancel
Save