Remove most direct bitcoin calls from qt/walletmodel.cpp
This commit is contained in:
committed by
John Newbery
parent
90d4640b7e
commit
a0704a8996
@@ -254,7 +254,7 @@ void TransactionView::setModel(WalletModel *_model)
|
||||
}
|
||||
|
||||
// show/hide column Watch-only
|
||||
updateWatchOnlyColumn(_model->haveWatchOnly());
|
||||
updateWatchOnlyColumn(_model->wallet().haveWatchOnly());
|
||||
|
||||
// Watch-only signal
|
||||
connect(_model, SIGNAL(notifyWatchonlyChanged(bool)), this, SLOT(updateWatchOnlyColumn(bool)));
|
||||
@@ -364,7 +364,7 @@ void TransactionView::exportClicked()
|
||||
// name, column, role
|
||||
writer.setModel(transactionProxyModel);
|
||||
writer.addColumn(tr("Confirmed"), 0, TransactionTableModel::ConfirmedRole);
|
||||
if (model->haveWatchOnly())
|
||||
if (model->wallet().haveWatchOnly())
|
||||
writer.addColumn(tr("Watch-only"), TransactionTableModel::Watchonly);
|
||||
writer.addColumn(tr("Date"), 0, TransactionTableModel::DateRole);
|
||||
writer.addColumn(tr("Type"), TransactionTableModel::Type, Qt::EditRole);
|
||||
@@ -393,8 +393,8 @@ void TransactionView::contextualMenu(const QPoint &point)
|
||||
// check if transaction can be abandoned, disable context menu action in case it doesn't
|
||||
uint256 hash;
|
||||
hash.SetHex(selection.at(0).data(TransactionTableModel::TxHashRole).toString().toStdString());
|
||||
abandonAction->setEnabled(model->transactionCanBeAbandoned(hash));
|
||||
bumpFeeAction->setEnabled(model->transactionCanBeBumped(hash));
|
||||
abandonAction->setEnabled(model->wallet().transactionCanBeAbandoned(hash));
|
||||
bumpFeeAction->setEnabled(model->wallet().transactionCanBeBumped(hash));
|
||||
|
||||
if(index.isValid())
|
||||
{
|
||||
@@ -414,7 +414,7 @@ void TransactionView::abandonTx()
|
||||
hash.SetHex(hashQStr.toStdString());
|
||||
|
||||
// Abandon the wallet transaction over the walletModel
|
||||
model->abandonTransaction(hash);
|
||||
model->wallet().abandonTransaction(hash);
|
||||
|
||||
// Update the table
|
||||
model->getTransactionTableModel()->updateTransaction(hashQStr, CT_UPDATED, false);
|
||||
|
||||
Reference in New Issue
Block a user