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

Downcase domain in lightning address and return normalized address #695

Merged
merged 1 commit into from
Dec 23, 2023

Conversation

andrei-21
Copy link
Contributor

The PR suggests to return and store normalized lightning address (downcased username and domain), such that it is stored and returned to the SDK user. Rationale here is to present what was the actual address satoshis were sent to.

Close #666.

@andrei-21 andrei-21 force-pushed the feature/return-lightning-address branch from 41072fd to b4e960c Compare December 19, 2023 21:30
Copy link
Contributor

@ok300 ok300 left a comment

Choose a reason for hiding this comment

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

A small suggestion in a comment, otherwise LGTM.

Thanks for the contribution!

///
/// The result is a tuple of (domain, LNURL-pay endpoint)
fn ln_address_decode(ln_address: &str) -> Result<(String, String)> {
/// The result is a tuple of (domain, LNURL-pay endpoint, lightning address)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// The result is a tuple of (domain, LNURL-pay endpoint, lightning address)
/// The result is a tuple of (domain, LNURL-pay endpoint, lowercase lightning address)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to:

/// The result is a tuple of (domain, LNURL-pay endpoint, downcased lightning address)

@ok300 ok300 requested review from dangeross and roeierez December 20, 2023 07:30
Copy link
Member

@roeierez roeierez left a comment

Choose a reason for hiding this comment

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

LGTM

@andrei-21 andrei-21 force-pushed the feature/return-lightning-address branch from b4e960c to a5893f6 Compare December 20, 2023 15:35
@dangeross
Copy link
Collaborator

dangeross commented Dec 20, 2023

utACK a5893f6

@ok300 ok300 merged commit 94e234f into breez:main Dec 23, 2023
7 checks passed
@andrei-21 andrei-21 deleted the feature/return-lightning-address branch December 30, 2023 10:21
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.

Lowercase lightning address (LUD-16) before validation
4 participants