Skip to content

Commit

Permalink
Merge pull request #316 from ElementsProject/fix-csv-passed-callback-…
Browse files Browse the repository at this point in the history
…active-swap-check

swap: exclude non-active swap in csvPassedCallback
  • Loading branch information
YusukeShimizu authored Oct 3, 2024
2 parents 92b5d83 + 2132b1e commit 73b33ed
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions swap/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,9 @@ func (s *SwapService) OnTxConfirmed(swapId string, txHex string, gotErr error) e
// OnCsvPassed sends the csvpassed event to the corresponding swap
func (s *SwapService) OnCsvPassed(swapId string) error {
swap, err := s.GetActiveSwap(swapId)
if errors.Is(err, ErrSwapDoesNotExist) {
return nil
}
if err != nil {
return err
}
Expand Down

0 comments on commit 73b33ed

Please sign in to comment.