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

Fix API startup's wallet.init failure when wallet is encrypted #5337

Merged

Conversation

ghubstan
Copy link
Contributor

This bug fix makes sure encrypted wallet initialization happens during startup, without prompting the user for a wallet password.

  • Block UI popups in api startup's encrypted wallet init.
    Running the UI's walletPasswordHandler during wallet initialization will block the API's wallet initialization. This change ensures an encrypted wallet does not trigger walletPasswordHandler.run() if isApiUser=true during startup.

  • Set WalletsManager key in first CoreWalletsService#unlockWallet call.
    This is necessary because the key cannot be set during api daemon startup, which does happen during the UI's startup. See commit eb15fda.

Running the UI's walletPasswordHandler during wallet initialization will fail
and block wallet initialization.  This change ensures an encrypted wallet
does not trigger a walletPasswordHandler.run() if isApiUser=true during startup.
This change sets the WalletsManager key the first time `unlockwallet` is called.
This is necessary because the key cannot be set during api daemon startup, as it
normally is at UI startup.  See commit eb15fda.
@ripcurlx ripcurlx added this to the v1.6.0 milestone Mar 22, 2021
Copy link
Member

@sqrrm sqrrm left a comment

Choose a reason for hiding this comment

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

utACK

@sqrrm sqrrm merged commit 9c40a64 into bisq-network:master Mar 22, 2021
@ghubstan ghubstan deleted the 01-fix-api-encrypted-walletappsetup branch March 22, 2021 13:00
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.

3 participants