Skip to content

ref(jsonrpc): Getting backup provider QR code now blocks #4198

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

Merged
merged 2 commits into from
Mar 22, 2023

Conversation

flub
Copy link
Contributor

@flub flub commented Mar 21, 2023

This changes the JSON-RPC APIs to get a QR code from the backup
provider to block. It means once you have a (blocking) call to
provide_backup() you can call get_backup_qr() or get_backup_qr_svg()
and they will block until the QR code is available.

Calling get_backup_qr() or get_backup_qr_svg() when there is no backup
provider will immediately error.

Closes #4191
#skip-changelog

This changes the JSON-RPC APIs to get a QR code from the backup
provider to block.  It means once you have a (blocking) call to
provide_backup() you can call get_backup_qr() or get_backup_qr_svg()
and they will block until the QR code is available.

Calling get_backup_qr() or get_backup_qr_svg() when there is no backup
provider will immediately error.
@flub flub requested review from link2xt and Simon-Laux March 21, 2023 16:38
@flub
Copy link
Contributor Author

flub commented Mar 21, 2023

I've jumped through some more hoops in order to get this state entirely in the JSON-RPC crate instead of fudging it into the Context as it was before. I think this is neater, but did involve some effort to get it to work. I hope you don't hate the result.

@flub flub mentioned this pull request Mar 21, 2023
25 tasks
@flub flub merged commit e985588 into master Mar 22, 2023
@flub flub deleted the flub/jsonrpc-blocking-qr branch March 22, 2023 11:45
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.

BackupProvider JSON-RPC: make getting QR code easier
2 participants