Skip to content

Commit

Permalink
feat: add single swap source (#583)
Browse files Browse the repository at this point in the history
* fix (clipper): add FMV check

* feat: add single swap source set
  • Loading branch information
lehainam-dev authored Nov 13, 2024
1 parent 9987ed6 commit c6f531a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pkg/valueobject/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -687,3 +687,16 @@ func IsRFQSource(exchange Exchange) bool {

return contained
}

// SingleSwapSourceSet is a set of exchanges that
// only allow a single swap in a route.
var SingleSwapSourceSet = map[Exchange]struct{}{
ExchangeClipper: {},
ExchangeBebop: {},
}

func IsSingleSwapSource(exchange Exchange) bool {
_, contained := SingleSwapSourceSet[exchange]

return contained
}

0 comments on commit c6f531a

Please sign in to comment.