fix: allow swaps with total < 0 (#143)

This commit is contained in:
Sebastian Rindom
2020-12-02 17:37:46 +01:00
committed by GitHub
parent 454504cdf4
commit 304431e7c3
5 changed files with 130 additions and 55 deletions
@@ -128,8 +128,8 @@ export default app => {
* Captures the payment associated with a swap
*/
route.post(
"/:id/swaps/:swap_id/capture",
middlewares.wrap(require("./capture-swap").default)
"/:id/swaps/:swap_id/process-payment",
middlewares.wrap(require("./process-swap-payment").default)
)
/**
@@ -7,7 +7,7 @@ export default async (req, res) => {
const order = await orderService.retrieve(id)
await swapService.capturePayment(swap_id)
await swapService.processDifference(swap_id)
// Decorate the order
const data = await orderService.decorate(