-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Conversation
fcd82b8
to
93216ae
Compare
93216ae
to
45ef2ff
Compare
} | ||
const sybilFeePercent = await paidActions[dbInvoice.actionType].getSybilFeePercent?.(args, context) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
Description
In #1570,
sybilFeePercent
was removed from the context. This broke zaps with fee credits becausesybilFeePercent
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