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

xpay: add marfeepercent argument #7936

Closed

Conversation

Lagrang3
Copy link
Collaborator

Add maxfeepercent argument to xpay to match some API uses like legacy pay.

Addresses (solves?) issue #7926.

As a user of Zeus wallet connected to my core-lightning node I can't use xpay using the provided default
hook (xpay-handle-pay) because the app sends through RPC some arguments that xpay does not yet handle
and falls back to legacy pay. For example maxfeepercent.

I would like to add support for as many arguments as possible or add some workarounds in order to make
xpay work on these use cases.

Changelog-Added: xpay: maxfeepercent argument to match some API uses like legacy pay

Signed-off-by: Lagrang3 <[email protected]>
Adding a "status" field to the rpc response avoids breaking changes to
applications that use the legacy pay API if they try to use xpay through
the `xpay-handle-pay` hook.

Changelog-Added: xpay: add status field to rpc response

Signed-off-by: Lagrang3 <[email protected]>
@Lagrang3 Lagrang3 force-pushed the xpay-fix-maxfeepercent branch from 7910b80 to de6c292 Compare December 13, 2024 19:39
Changelog-None

Signed-off-by: Lagrang3 <[email protected]>
@Lagrang3 Lagrang3 requested a review from cdecker as a code owner December 13, 2024 20:03
@rustyrussell rustyrussell added this to the v24.11.1 milestone Dec 13, 2024
maxfee_set = true;
}

/* Default is maxfee is 5sats, or 1%, whatever is greater */
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not have the same behaviour as pay with 0.5%? Imho it's a reasonable value that will get the payment through

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, we should do exactly the same logic, to avoid surprises!

@rustyrussell
Copy link
Contributor

No, I don't want this in xpay, let's do this in the compat layer!

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.

3 participants