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 'Cannot mix BigInt and other types' on zaps #1609

Merged
merged 3 commits into from
Nov 19, 2024

Conversation

ekzyis
Copy link
Member

@ekzyis ekzyis commented Nov 19, 2024

Description

In #1570, sybilFeePercent was removed from the context. This broke zaps with fee credits because sybilFeePercent was now undefined.

Additional Context

sybilFeePercent is now always included in any action context.

Checklist

Are your changes backwards compatible? Please answer below:

yes

On a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below:

6. I tested zaps with fee credits and pessimistic zaps via anon.

For frontend changes: Tested on mobile, light and dark mode? Please answer below:

n/a

Did you introduce any new environment variables? If so, call them out explicitly here:

no

@ekzyis ekzyis added the bug label Nov 19, 2024
@ekzyis ekzyis changed the title Fix 'Cannot mix Bigint and other types' on zaps Fix 'Cannot mix BigInt and other types' on zaps Nov 19, 2024
}
const sybilFeePercent = await paidActions[dbInvoice.actionType].getSybilFeePercent?.(args, context)
Copy link
Member Author

Choose a reason for hiding this comment

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

I am not sure why this wasn't included in the context before but passed to the context of perform as a separate variable. Was there a specific reason for it that I missed?

@@ -186,8 +187,7 @@ async function beginPessimisticAction (actionType, args, context) {
async function performP2PAction (actionType, args, incomingContext) {
// if the action has an invoiceable peer, we'll create a peer invoice
// wrap it, and return the wrapped invoice
const { cost, models, lnd, me } = incomingContext
const sybilFeePercent = await paidActions[actionType].getSybilFeePercent?.(args, incomingContext)
const { cost, sybilFeePercent, models, lnd, me } = incomingContext
Copy link
Member Author

Choose a reason for hiding this comment

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

The incoming context now already includes sybilFeePercent

@huumn huumn merged commit bcd229a into master Nov 19, 2024
6 checks passed
@huumn huumn deleted the fix-zap-cannot-mix-bigint branch November 19, 2024 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants