Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
fix mirror strategy not working without offsetTrades flag, fixes #127
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilsaraf committed Mar 19, 2019
1 parent 3a1b4c4 commit 09f76e8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugins/mirrorStrategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@ func (s *mirrorStrategy) PruneExistingOffers(buyingAOffers []horizon.Offer, sell

// PreUpdate changes the strategy's state in prepration for the update
func (s *mirrorStrategy) PreUpdate(maxAssetA float64, maxAssetB float64, trustA float64, trustB float64) error {
return s.recordBalances()
if s.offsetTrades {
return s.recordBalances()
}
return nil
}

func (s *mirrorStrategy) recordBalances() error {
Expand Down

0 comments on commit 09f76e8

Please sign in to comment.