From bed1de2142cd7fa3333f64432ccecf0bc743bbc3 Mon Sep 17 00:00:00 2001 From: jeffyanta Date: Thu, 15 Jan 2026 20:45:09 -0500 Subject: [PATCH] Funded state is a valid source state for cancelling a swap --- ocp/worker/swap/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocp/worker/swap/util.go b/ocp/worker/swap/util.go index e7918db..ca9b9fa 100644 --- a/ocp/worker/swap/util.go +++ b/ocp/worker/swap/util.go @@ -87,7 +87,7 @@ func (p *runtime) markSwapFailed(ctx context.Context, record *swap.Record) error func (p *runtime) markSwapCancelled(ctx context.Context, record *swap.Record) error { return p.data.ExecuteInTx(ctx, sql.LevelDefault, func(ctx context.Context) error { - err := p.validateSwapState(record, swap.StateCreated, swap.StateFunding) + err := p.validateSwapState(record, swap.StateCreated, swap.StateFunding, swap.StateFunded) if err != nil { return err }