message: [GUI] coin control: add icon and tooltip for delegated UTXOs
diff: @@ -265,6 +265,10 @@ void CoinControlDialog::buttonToggleLockClicked()
  if (model->isLockedCoin(uint256(item->text(COLUMN_TXHASH).toStdString()), item->text(COLUMN_VOUT_INDEX).toUInt())) {
  model->unlockCoin(outpt);
  item->setDisabled(false);
  + // restore cold-stake snowflake icon for P2CS which were previously locked
  + if (item->data(COLUMN_CHECKBOX, Qt::UserRole) == QString("Delegated"))
  + item->setIcon(COLUMN_CHECKBOX, QIcon("://ic-check-cold-staking-off"));
  + else
  item->setIcon(COLUMN_CHECKBOX, QIcon());
  } else {
  model->lockCoin(outpt);
  @@ -364,6 +368,10 @@ void CoinControlDialog::unlockCoin()
  COutPoint outpt(uint256(contextMenuItem->text(COLUMN_TXHASH).toStdString()), contextMenuItem->text(COLUMN_VOUT_INDEX).toUInt());
  model->unlockCoin(outpt);
  contextMenuItem->setDisabled(false);
  + // restore cold-stake snowflake icon for P2CS which were previously locked
  + if (contextMenuItem->data(COLUMN_CHECKBOX, Qt::UserRole) == QString("Delegated"))
  + contextMenuItem->setIcon(COLUMN_CHECKBOX, QIcon("://ic-check-cold-staking-off"));
  + else
  contextMenuItem->setIcon(COLUMN_CHECKBOX, QIcon());
  updateLabelLocked();
  }
  @@ -836,9 +844,23 @@ void CoinControlDialog::updateView()
  }
  // address
  + const bool fDelegated = (bool)(mine & ISMINE_SPENDABLE_DELEGATED);
  CTxDestination outputAddress;
  + CTxDestination outputAddressStaker;
  QString sAddress = "";
  - if (ExtractDestination(out.tx->vout[out.i].scriptPubKey, outputAddress)) {
  + bool haveDest = false;
  + if (fDelegated) {
  + txnouttype type; std::vector<CTxDestination> addresses; int nRequired;
  + haveDest = (ExtractDestinations(out.tx->vout[out.i].scriptPubKey, type, addresses, nRequired)
  + && addresses.size() == 2);
  + if (haveDest) {
  + outputAddressStaker = addresses[0];
  + outputAddress = addresses[1];
  + }
  + } else {
  + haveDest = ExtractDestination(out.tx->vout[out.i].scriptPubKey, outputAddress);
  + }
  + if (haveDest) {
  sAddress = QString::fromStdString(CBitcoinAddress(outputAddress).ToString());
  // if listMode or change => show PIVX address. In tree mode, address is not shown again for direct wallet address outputs
  @@ -891,6 +913,16 @@ void CoinControlDialog::updateView()
  // vout index
  itemOutput->setText(COLUMN_VOUT_INDEX, QString::number(out.i));
  + // outputs delegated (for cold staking)
  + if (fDelegated) {
  + itemOutput->setData(COLUMN_CHECKBOX, Qt::UserRole, QString("Delegated"));
  + itemOutput->setIcon(COLUMN_CHECKBOX, QIcon("://ic-check-cold-staking-off"));
  + if (haveDest) {
  + sAddress = QString::fromStdString(CBitcoinAddress(outputAddressStaker, CChainParams::STAKING_ADDRESS).ToString());
  + itemOutput->setToolTip(COLUMN_CHECKBOX, tr("delegated to %1 for cold staking").arg(sAddress));
  + }
  + }
  +
  // disable locked coins
  if (model->isLockedCoin(txhash, out.i)) {
  COutPoint outpt(txhash, out.i);
  