Merge branch 'master' into websockets
This commit is contained in:
19
src/rpc.h
19
src/rpc.h
@@ -24,6 +24,13 @@ struct TransactionItem {
|
||||
QString memo;
|
||||
};
|
||||
|
||||
struct WatchedTx {
|
||||
QString opid;
|
||||
Tx tx;
|
||||
std::function<void(QString, QString)> completed;
|
||||
std::function<void(QString, QString)> error;
|
||||
};
|
||||
|
||||
class RPC
|
||||
{
|
||||
public:
|
||||
@@ -42,11 +49,17 @@ public:
|
||||
void refreshZECPrice();
|
||||
void getZboardTopics(std::function<void(QMap<QString, QString>)> cb);
|
||||
|
||||
void executeTransaction(Tx tx,
|
||||
const std::function<void(QString opid)> submitted,
|
||||
const std::function<void(QString opid, QString txid)> computed,
|
||||
const std::function<void(QString opid, QString errStr)> error);
|
||||
|
||||
void fillTxJsonParams(json& params, Tx tx);
|
||||
void sendZTransaction (json params, const std::function<void(json)>& cb);
|
||||
void sendZTransaction(json params, const std::function<void(json)>& cb, const std::function<void(QString)>& err);
|
||||
void watchTxStatus();
|
||||
void addNewTxToWatch(Tx tx, const QString& newOpid);
|
||||
|
||||
const QMap<QString, Tx> getWatchingTxns() { return watchingOps; }
|
||||
void addNewTxToWatch(const QString& newOpid, WatchedTx wtx);
|
||||
|
||||
const TxTableModel* getTransactionsModel() { return transactionsTableModel; }
|
||||
const QList<QString>* getAllZAddresses() { return zaddresses; }
|
||||
@@ -103,7 +116,7 @@ private:
|
||||
QList<QString>* zaddresses = nullptr;
|
||||
QList<QString>* taddresses = nullptr;
|
||||
|
||||
QMap<QString, Tx> watchingOps;
|
||||
QMap<QString, WatchedTx> watchingOps;
|
||||
|
||||
TxTableModel* transactionsTableModel = nullptr;
|
||||
BalancesTableModel* balancesTableModel = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user