mirror of
https://github.com/feather-wallet/feather.git
synced 2024-11-16 17:27:38 +00:00
TxInfoDialog: add copy Tx ID button
This commit is contained in:
parent
3fec15e4aa
commit
3deaa1bc1d
3 changed files with 17 additions and 4 deletions
|
@ -29,8 +29,9 @@ TxInfoDialog::TxInfoDialog(QSharedPointer<AppContext> ctx, TransactionInfo *txIn
|
|||
m_txid = txInfo->hash();
|
||||
ui->label_txid->setText(m_txid);
|
||||
|
||||
connect(ui->btn_CopyTxKey, &QPushButton::pressed, this, &TxInfoDialog::copyTxKey);
|
||||
connect(ui->btn_createTxProof, &QPushButton::pressed, this, &TxInfoDialog::createTxProof);
|
||||
connect(ui->btn_copyTxID, &QPushButton::clicked, this, &TxInfoDialog::copyTxID);
|
||||
connect(ui->btn_CopyTxKey, &QPushButton::clicked, this, &TxInfoDialog::copyTxKey);
|
||||
connect(ui->btn_createTxProof, &QPushButton::clicked, this, &TxInfoDialog::createTxProof);
|
||||
|
||||
connect(m_ctx->wallet, &Wallet::newBlock, this, &TxInfoDialog::updateData);
|
||||
|
||||
|
@ -140,6 +141,10 @@ void TxInfoDialog::updateData() {
|
|||
this->setData(tx);
|
||||
}
|
||||
|
||||
void TxInfoDialog::copyTxID() {
|
||||
Utils::copyToClipboard(m_txid);
|
||||
}
|
||||
|
||||
void TxInfoDialog::copyTxKey() {
|
||||
m_ctx->wallet->getTxKeyAsync(m_txid, [this](QVariantMap map){
|
||||
QString txKey = map.value("tx_key").toString();
|
||||
|
|
|
@ -28,6 +28,7 @@ signals:
|
|||
void resendTranscation(const QString &txid);
|
||||
|
||||
private:
|
||||
void copyTxID();
|
||||
void copyTxKey();
|
||||
void createTxProof();
|
||||
void setData(TransactionInfo *tx);
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>929</width>
|
||||
<height>631</height>
|
||||
<height>715</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -205,10 +205,17 @@
|
|||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QPushButton" name="btn_copyTxID">
|
||||
<property name="text">
|
||||
<string>Copy Tx ID/hash</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btn_CopyTxKey">
|
||||
<property name="text">
|
||||
<string>Copy Transaction Key</string>
|
||||
<string>Copy Tx Secret Key</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Loading…
Reference in a new issue