qt: Use IsMine to validate custom change address

(cherry picked from commit c41224dfd5)
This commit is contained in:
Chris Moore
2017-08-30 00:32:54 -07:00
committed by MarcoFalke
parent 1227be30ec
commit a1ea1cfbd8
3 changed files with 7 additions and 9 deletions

View File

@@ -561,9 +561,9 @@ bool WalletModel::getPubKey(const CKeyID &address, CPubKey& vchPubKeyOut) const
return wallet->GetPubKey(address, vchPubKeyOut);
}
bool WalletModel::havePrivKey(const CKeyID &address) const
bool WalletModel::IsSpendable(const CTxDestination& dest) const
{
return wallet->HaveKey(address);
return IsMine(*wallet, dest) & ISMINE_SPENDABLE;
}
bool WalletModel::getPrivKey(const CKeyID &address, CKey& vchPrivKeyOut) const