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

reconnecting to wallet must sync wallet lock state with Core's state #676

Closed
chappjc opened this issue Sep 9, 2020 · 2 comments
Closed

Comments

@chappjc
Copy link
Member

chappjc commented Sep 9, 2020

When the wallet, say bitcoind`, restarts while dexc is running, dexc does not attempt to check the wallet's lock state against Core's. The reconnect hook needs to (1) change the UI wallet lock state to match the wallet, and (2) trigger wallet unlock if Core expects it to be.

Number 2 may be tricky though since unlocking the wallet requires the app password.

A related issue is that active swaps will fail in an unrecoverable manner presently with a locked wallet:

[ERR] CORE: route 'redemption' request handler error: dex-test.ssgen.io:7232 tick: {redeemMatches - order 1e488039f3b9b33c4f467ddd9374d3016402991ccc15919 f0fb5b014719932b2 - {rawrequest error: -13: Error: Please enter the wallet passphrase with walletpassphrase first.}}

In the above failure: asset.Wallet.Redeem returned that error. The asset backend should return a special error type for Core to recognize this and not kill the swap, instead prompting for a password.

@chappjc
Copy link
Member Author

chappjc commented Oct 22, 2020

Immediate resolution is caching wallet passphrases to automatically unlock wallets that are unexpectedly locked. A prompt would not provide sufficient time for most active swaps.

@itswisdomagain
Copy link
Member

This should be resolved by #817?

@chappjc chappjc closed this as completed Jan 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants