Skip to content
Snippets Groups Projects
Commit e77ddbb1 authored by Evgenii Tagiltsev's avatar Evgenii Tagiltsev
Browse files

[*] added comments for code

parent 4a6123f9
No related branches found
No related tags found
1 merge request!11Cellframe clone
......@@ -116,8 +116,9 @@ private slots:
void processGetCmdHistory();
// ---------------------------------------------
/// Handling service response for get wallet data
void processGetWalletData();
/// Handling service response for get result of putting transaction to mempool
void processGetResultTransaction();
public slots:
......@@ -176,12 +177,21 @@ public slots:
// ---------------------------------------------
/// Response wallet data
/// @param data
void setNewWalletData(const QVariant& aData);
/// Request wallet data
void requestWalletData();
/// Request for creation new transaction
/// @param name of wallet
/// @param address of a receiver
/// @param name of token
/// @param name of network
/// @param sum for transaction
/// @return result of trying to do transaction
void sendMempool(const QString& aFromWallet, const QString& aToAddress, const QString& aToken, const QString& aNetwork, const quint64 aValue);
/// Taking everything from mempool
/// @param network
void takeFromMempool(const QString& aNetwork);
};
......
......@@ -176,6 +176,7 @@ public slots:
static QObject *singletonProvider(QQmlEngine *engine, QJSEngine *scriptEngine);
public slots:
/// Request wallet data
void requestWalletData();
};
......
......@@ -23,5 +23,6 @@ void DapTransaction::sendToken(const QString& aNetwork)
void DapTransaction::receiveResult(const bool aSuccessful)
{
if(aSuccessful) emit sendToken("private");
emit sendResult(aSuccessful);
}
......@@ -12,8 +12,18 @@ public:
static DapTransaction& instance();
public slots:
/// Request for creation new transaction
/// @param name of wallet
/// @param address of a receiver
/// @param name of token
/// @param name of network
/// @param sum for transaction
void createRequestTransaction(const QString& aFromWallet, const QString& aToAddress, const QString& aToken, const QString& aNetwork, const quint64 aValue);
/// Taking everything from mempool
/// @param network
void sendToken(const QString& aNetwork);
/// Recevie result of putting to mempool
/// @param successful or not
void receiveResult(const bool aSuccessful);
signals:
......
......@@ -137,12 +137,23 @@ public slots:
/// @return history of last 50 commands
QString getCmdHistory() const;
/// Add new wallet
/// @param wallet name
/// @return sucessful or not
bool appendWallet(const QString& aWalletName) const;
/// Wallets data
/// @return data
QByteArray walletData() const;
/// Putting new transaction in mempool
/// @param name of wallet
/// @param address of a receiver
/// @param name of token
/// @param name of network
/// @param sum for transaction
/// @return sucessful or not
bool createTransaction(const QString& aFromWallet, const QString& aToAddress, const QString& aTokenName, const QString& aNetwork, const quint64 aValue);
/// Taking everything from mempool
/// @param network
void takeFromMempool(const QString& aNetwork);
private slots:
......@@ -151,7 +162,8 @@ private slots:
/// Send new history transaction to client
/// @param New history transaction
void doSendNewHistory(const QVariant& aData);
/// Taking everything from mempool
/// @param network
void doSendNewWalletData(const QByteArray& aData);
};
......
......@@ -21,6 +21,8 @@ public:
/// @return result of trying to do transaction
bool createTransaction(const QString& aFromWallet, const QString& aToAddress, const QString& aTokenName, const QString& aNetwork, const quint64 aValue) const;
/// Taking everything from mempool
/// @param network
void takeFromMempool(const QString& aNetwork);
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment