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

Handle specific errors from the LSP upon invoice #601

Merged
merged 1 commit into from Jul 6, 2023

Conversation

TonyGiorgio
Copy link
Contributor

This will give us more indication of what went wrong during invoice creation. The common reasons are because the user is not connected to the LSP or the LSP has ran out of confirmed funds.

@futurepaul you should review the API logic here.

The proposed changes I would like mutiny-web to do is to check the error on create_bip21 for an Lsp related error and fall back to get_new_address if that's the case. This is so that you may show the user the connection error or lsp funding error, but still allow them to proceed with receiving on chain funds with that warning in mind.

Relies on https://github.com/voltagecloud/lsp-server/pull/138

Related to MutinyWallet/mutiny-web#249

Copy link
Contributor

@futurepaul futurepaul left a comment

Choose a reason for hiding this comment

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

this will be a huge improvement thank you, especially appreciate the docs on what potential errors I can get so I can match on them

Copy link
Collaborator

@benthecarman benthecarman left a comment

Choose a reason for hiding this comment

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

One comment otherwise looks great

mutiny-core/src/lspclient.rs Outdated Show resolved Hide resolved
@TonyGiorgio TonyGiorgio merged commit 59600bb into master Jul 6, 2023
9 checks passed
@TonyGiorgio TonyGiorgio deleted the lsp-proposal-errors branch July 6, 2023 04: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.

None yet

3 participants