Skip to content

client/dcr: Unlock wallet if acct not encrypted.#1582

Merged
chappjc merged 1 commit intodecred:masterfrom
JoeGruffins:encryptacctthen
Apr 15, 2022
Merged

client/dcr: Unlock wallet if acct not encrypted.#1582
chappjc merged 1 commit intodecred:masterfrom
JoeGruffins:encryptacctthen

Conversation

@JoeGruffins
Copy link
Copy Markdown
Member

closes #1576

Comment on lines +699 to +700
if res.Encrypted {
return translateRPCCancelErr(w.rpcClient.UnlockAccount(ctx, acctName, string(pw)))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for restoring this logic. I suppose it makes sense to restore it down here in the rpcWallet code instead of up at the ExchangeWallet level where it was.

Also, I can confirm that (*rpcWallet).LockAccount does have this accountunlocked check.

Comment thread client/core/core.go Outdated
if err != nil {
return err
}
defer crypter.Close()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, we don't do this anywhere, and there seem to be numerous places we should. Can we split this out and address them all in another PR?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok.

Copy link
Copy Markdown
Member Author

@JoeGruffins JoeGruffins Apr 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chappjc chappjc merged commit a2dce8a into decred:master Apr 15, 2022
@chappjc chappjc added this to the 0.5 milestone Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

core/simnet_tests: account is not encrypted with a unique passphrase

2 participants