|
|
|
@ -151,6 +151,7 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa
|
|
|
|
|
abandonAction = new QAction(tr("Abandon transaction"), this);
|
|
|
|
|
bumpFeeAction = new QAction(tr("Increase transaction fee"), this);
|
|
|
|
|
bumpFeeAction->setObjectName("bumpFeeAction");
|
|
|
|
|
rebroadcastAction = new QAction(tr("Rebroadcast transaction"), this);
|
|
|
|
|
copyAddressAction = new QAction(tr("Copy address"), this);
|
|
|
|
|
copyLabelAction = new QAction(tr("Copy label"), this);
|
|
|
|
|
QAction *copyAmountAction = new QAction(tr("Copy amount"), this);
|
|
|
|
@ -172,6 +173,7 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa
|
|
|
|
|
contextMenu->addSeparator();
|
|
|
|
|
contextMenu->addAction(bumpFeeAction);
|
|
|
|
|
contextMenu->addAction(abandonAction);
|
|
|
|
|
contextMenu->addAction(rebroadcastAction);
|
|
|
|
|
contextMenu->addAction(editLabelAction);
|
|
|
|
|
|
|
|
|
|
connect(dateWidget, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), this, &TransactionView::chooseDate);
|
|
|
|
@ -187,6 +189,7 @@ TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *pa
|
|
|
|
|
|
|
|
|
|
connect(bumpFeeAction, &QAction::triggered, this, &TransactionView::bumpFee);
|
|
|
|
|
connect(abandonAction, &QAction::triggered, this, &TransactionView::abandonTx);
|
|
|
|
|
connect(rebroadcastAction, &QAction::triggered, this, &TransactionView::rebroadcastTx);
|
|
|
|
|
connect(copyAddressAction, &QAction::triggered, this, &TransactionView::copyAddress);
|
|
|
|
|
connect(copyLabelAction, &QAction::triggered, this, &TransactionView::copyLabel);
|
|
|
|
|
connect(copyAmountAction, &QAction::triggered, this, &TransactionView::copyAmount);
|
|
|
|
@ -394,6 +397,7 @@ void TransactionView::contextualMenu(const QPoint &point)
|
|
|
|
|
hash.SetHex(selection.at(0).data(TransactionTableModel::TxHashRole).toString().toStdString());
|
|
|
|
|
abandonAction->setEnabled(model->wallet().transactionCanBeAbandoned(hash));
|
|
|
|
|
bumpFeeAction->setEnabled(model->wallet().transactionCanBeBumped(hash));
|
|
|
|
|
rebroadcastAction->setEnabled(model->wallet().transactionCanBeRebroadcast(hash));
|
|
|
|
|
copyAddressAction->setEnabled(GUIUtil::hasEntryData(transactionView, 0, TransactionTableModel::AddressRole));
|
|
|
|
|
copyLabelAction->setEnabled(GUIUtil::hasEntryData(transactionView, 0, TransactionTableModel::LabelRole));
|
|
|
|
|
|
|
|
|
@ -443,6 +447,21 @@ void TransactionView::bumpFee()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TransactionView::rebroadcastTx()
|
|
|
|
|
{
|
|
|
|
|
if (!transactionView || !transactionView->selectionModel())
|
|
|
|
|
return;
|
|
|
|
|
QModelIndexList selection = transactionView->selectionModel()->selectedRows(0);
|
|
|
|
|
|
|
|
|
|
// get the hash from the TxHashRole (QVariant / QString)
|
|
|
|
|
uint256 hash;
|
|
|
|
|
QString hashQStr = selection.at(0).data(TransactionTableModel::TxHashRole).toString();
|
|
|
|
|
hash.SetHex(hashQStr.toStdString());
|
|
|
|
|
|
|
|
|
|
// Rebroadcast the wallet transaction over the walletModel
|
|
|
|
|
model->wallet().rebroadcastTransaction(hash);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TransactionView::copyAddress()
|
|
|
|
|
{
|
|
|
|
|
GUIUtil::copyEntryData(transactionView, 0, TransactionTableModel::AddressRole);
|
|
|
|
|