Skip to content

Commit

Permalink
Merge #1121: [GUI] Cold staking, alert user if the owner address is n…
Browse files Browse the repository at this point in the history
…ot from the wallet

6daa383 [GUI] Cold staking, alert user if the owner address is not from the wallet. (furszy)

Pull request description:

  Cold staking delegation, popup alerting user if the owner address is not from the wallet.

  Preview.
  <img width="633" alt="Screen Shot 2019-11-20 at 10 59 46 AM" src="https://user-images.githubusercontent.com/5377650/69245395-80579200-0b85-11ea-9209-b981492b8f4f.png">

ACKs for top commit:
  Mrs-X:
    I'm fine with the final text, so utACK 6daa383
  random-zebra:
    utACK 6daa383

Tree-SHA512: c5095790aff0590edae9f4606263fb5be2ff886e46f0709289a0b44bb79b6b2fb218fa1b3a4ae2ebc5178dfc6e2694ccaaf615aa0bb763f5e22a7387ad054f37
  • Loading branch information
random-zebra committed Nov 28, 2019
2 parents c7bc2e1 + 6daa383 commit 0216fd3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/qt/pivx/coldstakingwidget.cpp
Expand Up @@ -423,6 +423,16 @@ void ColdStakingWidget::onSendClicked(){

if (!isOwnerAddressFromThisWallet) {
isOwnerAddressFromThisWallet = walletModel->isMine(inputOwner);

// Warn the user if the owner address is not from this wallet
if (!isOwnerAddressFromThisWallet &&
!ask(tr("ALERT!"),
tr("Delegating to an external owner address!\n\n"
"The delegated coins will NOT be spendable by this wallet.\nSpending these coins will need to be done from the wallet or\ndevice containing the owner address.\n\n"
"Do you wish to proceed?"))
) {
return;
}
}

// Don't try to delegate the balance if both addresses are from this wallet
Expand Down

0 comments on commit 0216fd3

Please sign in to comment.