Skip to content

Commit

Permalink
[PAY-2273] Fix payExtra for coinflow and stripe (#6943)
Browse files Browse the repository at this point in the history
Co-authored-by: Marcus Pasell <3690498+rickyrombo@users.noreply.github.com>
  • Loading branch information
2 people authored and amendelsohn committed Dec 14, 2023
1 parent 5bb7adf commit 1b48c38
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/common/src/store/purchase-content/sagas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ function* doStartPurchaseContentFlow({
)
}

const purchaseAmount = (price + (extraAmount ?? 0)) / 100.0
switch (purchaseVendor) {
case PurchaseVendor.COINFLOW:
// Purchase with coinflow, funding and completing the purchase in one step.
Expand All @@ -413,12 +414,12 @@ function* doStartPurchaseContentFlow({
splits,
contentId,
purchaserUserId,
price: price / 100.0
price: purchaseAmount
})
break
case PurchaseVendor.STRIPE:
// Buy USDC with Stripe. Once funded, continue with purchase.
yield* call(purchaseUSDCWithStripe, { amount: price / 100.0 })
yield* call(purchaseUSDCWithStripe, { amount: purchaseAmount })
yield* call(purchaseContent, audiusBackendInstance, {
id: contentId,
blocknumber,
Expand Down

0 comments on commit 1b48c38

Please sign in to comment.