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: lnurl pay to use existing lightning address #660

Merged
merged 2 commits into from
Sep 18, 2024
Merged

Conversation

rolznz
Copy link
Contributor

@rolznz rolznz commented Sep 18, 2024

fixes #650

@im-adithya how it was implemented before was very unstable. We should avoid editing internals and instead use the public API of the object.

const lnAddress = new LightningAddress(lnurlDetails.identifier);
// this is set instead of calling fetch because
// requestInvoice uses lnurlpData.callback
lnAddress.lnurlpData = lnurlDetails;
const invoice = await lnAddress.requestInvoice({
Copy link
Member

Choose a reason for hiding this comment

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

I tried doing this first but for some weird reason this function was not being passed to this screen via state, but somehow it works for me now 👍

Copy link
Member

@im-adithya im-adithya left a comment

Choose a reason for hiding this comment

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

tACK

@im-adithya im-adithya merged commit 46e76d9 into master Sep 18, 2024
9 checks passed
@im-adithya im-adithya deleted the fix/lnurl-pay branch September 18, 2024 10:25
@rolznz rolznz modified the milestones: v1.9.0, v1.8.1 Sep 19, 2024
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.

Unable to pay Primal invoice (with Cashu backend)
2 participants