Skip to content

Commit ef232f8

Browse files
committed
[GUI] Cold staking, copy owner address instead of the staking address. Staking addresses should be presented in a separate dialog, can have many of them with the same owner.
1 parent fd3bfd1 commit ef232f8

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/qt/pivx/coldstakingwidget.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ void ColdStakingWidget::handleAddressClicked(const QModelIndex &rIndex){
444444
this->menu->setEditBtnText(tr("Stake"));
445445
this->menu->setDeleteBtnText(tr("Blacklist"));
446446
this->menu->setCopyBtnText(tr("Edit Label"));
447-
this->menu->setLastBtnText(tr("Copy staking\naddress"), 40);
447+
this->menu->setLastBtnText(tr("Copy owner\naddress"), 40);
448448
this->menu->setLastBtnVisible(true);
449449
this->menu->setMinimumHeight(157);
450450
this->menu->setFixedHeight(157);
@@ -454,7 +454,7 @@ void ColdStakingWidget::handleAddressClicked(const QModelIndex &rIndex){
454454
connect(this->menu, SIGNAL(onEditClicked()), this, SLOT(onEditClicked()));
455455
connect(this->menu, SIGNAL(onDeleteClicked()), this, SLOT(onDeleteClicked()));
456456
connect(this->menu, SIGNAL(onCopyClicked()), this, SLOT(onLabelClicked()));
457-
connect(this->menu, SIGNAL(onLastClicked()), this, SLOT(onCopyStakingClicked()));
457+
connect(this->menu, SIGNAL(onLastClicked()), this, SLOT(onCopyOwnerClicked()));
458458
}else {
459459
this->menu->hide();
460460
}
@@ -472,7 +472,7 @@ void ColdStakingWidget::handleAddressClicked(const QModelIndex &rIndex){
472472
this->menu->setDeleteBtnVisible(false);
473473
this->menu->setEditBtnVisible(false);
474474
this->menu->setCopyBtnVisible(false);
475-
this->menu->setMinimumHeight(50);
475+
this->menu->setMinimumHeight(60);
476476
}
477477
if (adjustSize) this->menu->adjustSize();
478478

@@ -510,10 +510,10 @@ void ColdStakingWidget::onCopyClicked() {
510510
// show address info
511511
}
512512

513-
void ColdStakingWidget::onCopyStakingClicked() {
514-
QString owner = index.sibling(index.row(), ColdStakingModel::STAKING_ADDRESS).data(Qt::DisplayRole).toString();
513+
void ColdStakingWidget::onCopyOwnerClicked() {
514+
QString owner = index.data(Qt::DisplayRole).toString();
515515
GUIUtil::setClipboard(owner);
516-
inform(tr("Staking address copied"));
516+
inform(tr("Owner address copied"));
517517
}
518518

519519
void ColdStakingWidget::onLabelClicked(){

src/qt/pivx/coldstakingwidget.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ private slots:
5252
void onEditClicked();
5353
void onDeleteClicked();
5454
void onCopyClicked();
55-
void onCopyStakingClicked();
55+
void onCopyOwnerClicked();
5656
void onTxArrived(const QString& hash);
5757
void onContactsClicked(bool ownerAdd);
5858
void clearAll();

0 commit comments

Comments
 (0)