Monday icon indicating copy to clipboard operation
Monday copied to clipboard

Add option to switch LSP

Open danielnordh opened this issue 7 months ago • 4 comments

This adds an option under settings to switch LSP. #146

danielnordh avatar May 23 '25 14:05 danielnordh

Whoa, look at this! Will review.

reez avatar May 23 '25 22:05 reez

I tested this, had issue with switching LSP.

Then I applied the changes suggested that would properly switch the LSP, and it worked switching the LSP (switched from Megalith to See).

I want to finish out that this all works right by being able to switch the LSP and things still work, I tried creating a bolt11 and paying from the faucet but got error_no_route... not saying that's a problem with the app but I would like to see that flow work properly just to know for sure I'm not missing anything.

reez avatar May 24 '25 20:05 reez

Thanks for testing, and it makes sense to do further testing to confirm working order. I made the PR rather quickly without much testing.

danielnordh avatar May 26 '25 10:05 danielnordh

Thanks for testing, and it makes sense to do further testing to confirm working order.

I made the PR rather quickly without much testing.

I'm glad you made the PR, looks basically almost there, really good

reez avatar May 26 '25 18:05 reez

After adding the suggested changes I did some more testing.

Existing wallet with 3 channels and 230k sats receive capability

  • For 240k receive I get JIT invoices from See and Megalith, not LQWD and Olympus

New wallet with 0 channels

  • For 240k receive I get JIT invoice only from See and Megalith, not LQWD and Olympus But I'm also not getting them when reverting to the pre-PR state.

Payment

  • Successfully sent from wallet 1 (Megalith) to wallet 2 (Lqwd)
  • Successfully sent from wallet 2 (Olympus) to wallet 2 (See)

Unrelated issues?

  1. Should not generate Bolt11 if no channels When I tap 'Receive' from a wallet with no channels and zero sats, I get this error:

"Error generating unified QR: " "The operation couldn’t be completed. (LDKNode.NodeError error 6.)"

But I think that is expected? because I get it without my PR as well.

It then proceeds to generate the separate addresses (onchain, and bolt11, which it shouldn't really unless it's a JIT) and makes those into a unified QR.

Default amount is 0 when tapping 'Receive', so JIT invoice request will probably be rejected even if requested? Should probably tackle this separate from this PR.

danielnordh avatar Jun 11 '25 14:06 danielnordh

excellent job my friend!

reez avatar Jun 11 '25 15:06 reez