Skip to content

Commit

Permalink
fixedmaker, liquiditymaker: update initialize method
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Dec 19, 2023
1 parent 3dd93b6 commit 4894a59
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pkg/strategy/fixedmaker/strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,10 @@ func (s *Strategy) Defaults() error {
}

func (s *Strategy) Initialize() error {
s.Strategy = &common.Strategy{}
if s.Strategy == nil {
s.Strategy = &common.Strategy{}
}

return nil
}

Expand Down
4 changes: 3 additions & 1 deletion pkg/strategy/liquiditymaker/strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ type Strategy struct {
}

func (s *Strategy) Initialize() error {
s.Strategy = &common.Strategy{}
if s.Strategy == nil {
s.Strategy = &common.Strategy{}
}
return nil
}

Expand Down

0 comments on commit 4894a59

Please sign in to comment.