Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing crash on non-HD wallet. #1001

Merged
merged 2 commits into from
Feb 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/qt/bitcoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -763,8 +763,8 @@ int main(int argc, char *argv[])
// - Using mnemonic (-usemnemonic on (default)) and
// - mnemonic not set (default, not setting mnemonic from conf file instead) and
// - hdseed not set (default, not setting hd seed from conf file instead)

if(GetBoolArg("-usemnemonic", DEFAULT_USE_MNEMONIC) &&
if(GetBoolArg("-usehd", DEFAULT_USE_HD_WALLET) &&
GetBoolArg("-usemnemonic", DEFAULT_USE_MNEMONIC) &&
!GetBoolArg("-disablewallet", false) &&
GetArg("-mnemonic", "").empty() &&
GetArg("-hdseed", "not hex")=="not hex"){
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2981,7 +2981,7 @@ std::vector<unsigned char> CWallet::EncryptMintAmount(uint64_t amount, const sec
}

bool CWallet::DecryptMintAmount(const std::vector<unsigned char>& encryptedValue, const secp_primitives::GroupElement& pubcoin, uint64_t& amount) const {
if(IsLocked()) {
if (IsLocked() || hdChain.masterKeyID.IsNull()) {
amount = 0;
return true;
}
Expand Down