diff --git a/venue/batchtx/tx.go b/venue/batchtx/tx.go index 4b7db032a..bb0ba4900 100644 --- a/venue/batchtx/tx.go +++ b/venue/batchtx/tx.go @@ -518,9 +518,12 @@ func (e *ExecutionContext) assembleBatchTx(orderBatch *matching.OrderBatch, orderDetails := matchedOrder.Details bid := orderDetails.Bid ask := orderDetails.Ask + + fundingAmount := orderDetails.Quote.TotalSatsCleared + + bid.SelfChanBalance _, fundingOutput, err := input.GenFundingPkScript( bid.MultiSigKey[:], ask.MultiSigKey[:], - int64(orderDetails.Quote.TotalSatsCleared), + int64(fundingAmount), ) if err != nil { return err