Skip to content

Commit

Permalink
check order exists before check if cancelled (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
uv-orbs committed Apr 15, 2024
1 parent a277226 commit fff7ff4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion service/taker.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func (s *Service) AbortSwap(ctx context.Context, swapId uuid.UUID) error {
orders = append(orders, *order)
}
// cancelled orders
if order.Cancelled {
if order != nil && order.Cancelled {
cancelled = append(cancelled, *order)
}
}
Expand Down

0 comments on commit fff7ff4

Please sign in to comment.