Skip to content

Commit

Permalink
[BUG] GUI: invalid locking of shield notes in coin control
Browse files Browse the repository at this point in the history
  • Loading branch information
random-zebra committed Dec 2, 2021
1 parent 4ab2e10 commit d281cde
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/qt/coincontroldialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -713,13 +713,16 @@ void CoinControlDialog::loadAvailableCoin(bool treeMode,
// vout index
itemOutput->setText(COLUMN_VOUT_INDEX, QString::number(outIndex));

// disable locked coins
const bool isLockedCoin = model->isLockedCoin(txhash, outIndex);
if (isLockedCoin) {
--nSelectableInputs;
coinControl->UnSelect({txhash, outIndex}); // just to be sure
itemOutput->setDisabled(true);
itemOutput->setIcon(COLUMN_CHECKBOX, QIcon(":/icons/lock_closed"));
// disable locked coins (!TODO: implement locked notes)
bool isLockedCoin{false};
if (fSelectTransparent) {
isLockedCoin = model->isLockedCoin(txhash, outIndex);
if (isLockedCoin) {
--nSelectableInputs;
coinControl->UnSelect({txhash, outIndex}); // just to be sure
itemOutput->setDisabled(true);
itemOutput->setIcon(COLUMN_CHECKBOX, QIcon(":/icons/lock_closed"));
}
}

// set checkbox
Expand Down

0 comments on commit d281cde

Please sign in to comment.