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/proxy payment #745

Merged
merged 5 commits into from
Sep 27, 2023
Merged

Fix/proxy payment #745

merged 5 commits into from
Sep 27, 2023

Conversation

elraphty
Copy link
Contributor

Describe your changes

This PR removes the capitalization of organization names and adds a route hint for proxy users' keysend payments.

Issue ticket number and link

Closes #739
Closes #738

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have tested on Chrome and Firefox
  • I have tested on a mobile device

Copy link
Contributor

@kevkevinpal kevkevinpal left a comment

Choose a reason for hiding this comment

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

looks good to me if you could make that one part a util to make it more common that would be good

Comment on lines 316 to 320
if request.RouteHint != "" {
bodyData = fmt.Sprintf(`{"amount": %d, "destination_key": "%s", "route_hint": "%s"}`, amount, request.ReceiverPubKey, request.RouteHint)
} else {
bodyData = fmt.Sprintf(`{"amount": %d, "destination_key": "%s"}`, amount, request.ReceiverPubKey)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like were doing this in two locations it might make more sense to make this a util than repeating code

Comment on lines 74 to 79
var bodyData string
if inv.Route_hint != "" {
bodyData = fmt.Sprintf(`{"amount": %s, "destination_key": "%s", "route_hint": "%s"}`, inv.Amount, inv.User_pubkey, inv.Route_hint)
} else {
bodyData = fmt.Sprintf(`{"amount": %s, "destination_key": "%s"}`, inv.Amount, inv.User_pubkey)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like were doing this in two locations it might make more sense to make this a util than repeating code

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have created a util function for it.

@kevkevinpal
Copy link
Contributor

looks good to me merging

@kevkevinpal kevkevinpal merged commit 85cd523 into master Sep 27, 2023
2 of 3 checks passed
@Evanfeenstra Evanfeenstra deleted the fix/proxy_payment branch January 26, 2024 17:54
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.

Bounty payment failed through organization Do not change capitalization in organization names
2 participants