@@ -228,8 +228,8 @@ void ColdStakingWidget::loadWalletModel(){
228228
229229}
230230
231- void ColdStakingWidget::onTxArrived (const QString& hash) {
232- if (walletModel-> isDelegatedToOrFromMe (hash) || walletModel-> isP2CSSpend (hash) ) {
231+ void ColdStakingWidget::onTxArrived (const QString& hash, const bool & isCoinStake, const bool & isCSAnyType ) {
232+ if (isCSAnyType ) {
233233 tryRefreshDelegations ();
234234 }
235235}
@@ -328,7 +328,7 @@ void ColdStakingWidget::onContactsClicked(){
328328 }
329329
330330 if (isContactOwnerSelected) {
331- menuContacts->setWalletModel (walletModel, AddressTableModel::Send );
331+ menuContacts->setWalletModel (walletModel, AddressTableModel::Receive );
332332 } else {
333333 menuContacts->setWalletModel (walletModel, AddressTableModel::Delegators);
334334 }
@@ -344,6 +344,11 @@ void ColdStakingWidget::onDelegateSelected(bool delegate){
344344 if (menu && menu->isVisible ()) {
345345 menu->hide ();
346346 }
347+
348+ if (menuAddresses && menuAddresses->isVisible ()) {
349+ menuAddresses->hide ();
350+ }
351+
347352 if (delegate){
348353 ui->btnCoinControl ->setVisible (true );
349354 ui->containerSend ->setVisible (true );
@@ -560,7 +565,6 @@ void ColdStakingWidget::handleAddressClicked(const QModelIndex &rIndex) {
560565 pos.setX (pos.x () - (DECORATION_SIZE * 2 ));
561566 pos.setY (pos.y () + (DECORATION_SIZE * 2 ));
562567
563- bool adjustSize = false ;
564568 if (!this ->menu ){
565569 this ->menu = new TooltipMenu (window, this );
566570 this ->menu ->setEditBtnText (tr (" Stake" ));
@@ -571,7 +575,6 @@ void ColdStakingWidget::handleAddressClicked(const QModelIndex &rIndex) {
571575 this ->menu ->setMinimumHeight (157 );
572576 this ->menu ->setFixedHeight (157 );
573577 this ->menu ->setMinimumWidth (125 );
574- adjustSize = true ;
575578 connect (this ->menu , &TooltipMenu::message, this , &AddressesWidget::message);
576579 connect (this ->menu , SIGNAL (onEditClicked ()), this , SLOT (onEditClicked ()));
577580 connect (this ->menu , SIGNAL (onDeleteClicked ()), this , SLOT (onDeleteClicked ()));
@@ -588,6 +591,7 @@ void ColdStakingWidget::handleAddressClicked(const QModelIndex &rIndex) {
588591 Qt::DisplayRole).toBool ();
589592 this ->menu ->setDeleteBtnVisible (isWhitelisted);
590593 this ->menu ->setEditBtnVisible (!isWhitelisted);
594+ this ->menu ->setCopyBtnVisible (true );
591595 this ->menu ->setMinimumHeight (157 );
592596 } else {
593597 // owner side
@@ -596,7 +600,8 @@ void ColdStakingWidget::handleAddressClicked(const QModelIndex &rIndex) {
596600 this ->menu ->setCopyBtnVisible (false );
597601 this ->menu ->setMinimumHeight (60 );
598602 }
599- if (adjustSize) this ->menu ->adjustSize ();
603+
604+ this ->menu ->adjustSize ();
600605
601606 menu->move (pos);
602607 menu->show ();
0 commit comments