Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardobl committed Nov 14, 2024
1 parent 0223c9e commit a016427
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/paidAction/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export default async function performPaidAction (actionType, args, { ...context
for (const paymentMethod of supportedPaymentMethods) {
console.log(`trying payment method ${paymentMethod}`)

if (paymentMethod === PAID_ACTION_PAYMENT_METHODS) {
if (paymentMethod === PAID_ACTION_PAYMENT_METHODS.P2P) {
try {
return await performP2PAction(actionType, args, context, paymentMethod)
} catch (e) {
Expand All @@ -124,7 +124,7 @@ export default async function performPaidAction (actionType, args, { ...context
}
} catch (e) {
console.error('performPaidAction failed with internal payment method', e)
// if we fail for reasons unrelated to balance, we should throw to fail the mutation
// if we fail for reasons unrelated to balance, we should throw to fail the action
if (!e.message.includes('\\"users\\" violates check constraint \\"msats_positive\\"')) {
throw e
}
Expand Down

0 comments on commit a016427

Please sign in to comment.